Thursday, September 29, 2011

How to find IP Address of System

* you can use command Prompt statement for this.
the commands to find IP Address  are below,
C:\>ipconfig
or
C:\>ipconfig/all

(or)

*Finding IP address using java programme

 FingIPAddress.java
---------------------------------------
import java.net.*;
public class FindIPAddress {
public static void main(String[] args) throws UnknownHostException{
InetAddress ia = InetAddress.getLocalHost();
String s=ia.toString();
System.out.println("IP address to a String is: "+s);
    }
}

No comments:

Post a Comment