Discover The Hostname Of Your Local Machine
The class java.net.InetAddress represents an Internet Protocol (IP) address. It has a static method, getLocalHost(), that you can use to obtain an instance of java.net.InetAddress based on your local machine’s