System.out.println(InetAddress.getLocalHost().getHostName());

System.out.println(InetAddress.getLocalHost().getHostAddress());