import java.net.InetAddress; import java.net.UnknownHostException; public class NameLookUP_SingleRun { public static void main(String[] args) { String version = System.getProperty("java.version"); System.out.println(version); Long start = System.currentTimeMillis(); try { InetAddress.getLocalHost().getHostName(); Long currentElapsed = System.currentTimeMillis() - start; System.out.println("Elapsed Time="+currentElapsed); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }