document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import java.net.*;
  2. public class IPtoName {
  3.     public static void main(String args[]) {
  4.         if (args.length == 0) {
  5.             System.out.println("Pemakaian: java IPtoName <IP address>");
  6.             System.exit(0);
  7.         }
  8.  
  9.         String host = args[0];
  10.         InetAddress address = null;
  11.         try {
  12.             address = InetAddress.getByName(host);
  13.         } catch (UnknownHostException e) {
  14.             System.out.println("invalid IP - malformed IP");
  15.             System.exit(0);
  16.         }
  17.  
  18.         System.out.println(address.getHostName());
  19.     }
  20. }
');