Sep 30

Use the getHostName() method of the InetAddress class


InetAddress address = InetAddress.getLocalHost();
String hostname = address.getHostName(); 

written by objects \\ tags:


Leave a Reply

You must be logged in to post a comment.