import java.util.*;
import java.lang.*;
import java.net.*;
public class OwnIP{
public static void main(String args[]){
try{
InetAddress ownIP=InetAddress.getLocalHost();
System.out.println("IP Address of this Computer :"+ownIP.getHostAddress());
}
catch(Exception e){
System.out.println("Exception Caught");
}
}
}
import java.lang.*;
import java.net.*;
public class OwnIP{
public static void main(String args[]){
try{
InetAddress ownIP=InetAddress.getLocalHost();
System.out.println("IP Address of this Computer :"+ownIP.getHostAddress());
}
catch(Exception e){
System.out.println("Exception Caught");
}
}
}
No comments:
Post a Comment