To get computer name in Java you can use the following snippet.
Sample Java
import java.net.*; System.out.println(InetAddress.getLocalHost().getHostName());
All the Code Snippets and Samples you need
To get computer name in Java you can use the following snippet.
import java.net.*; System.out.println(InetAddress.getLocalHost().getHostName());
You must be logged in to post a comment.
RT @CodeSnippetsNET: How to get computer name in #Java http://t.co/iqNnBVGpAy #programming #code #dev #coding