import java.net.*;
import java.io.*;
public class ip_host {
public static void main(String args[]) throws Exception {
System.out.println("Enter the host name :");
String n = new DataInputStream(System.in).readLine();
InetAddress ipadd = InetAddress.getByName(n);
System.out.println("IP address :" + ipadd);
}
}
I have this program which finds the IP address, but i want to extend it to find the IP class as well.