Friday, June 7, 2013

Get IP by Java Code

Get your IP address by Java Coding.

Though it is very common and familiar program, I have uploaded to my blog.

 /**
 * IpAddress.java
 *
 * @author 
 * Santanu Kar
 **/
import java.net.InetAddress;

public class IpAddress{

    public static void main (String[] args) throws Exception {
System.out.println(InetAddress.getLocalHost());
}
    
}

No comments:

Post a Comment