Program : To display Local machines IP Address
By : Kapil Lohia
import java.net.*; import java.io.*; public class ip_localmachine { public static void main(String args[]) throws Exception { InetAddress ipadd =InetAddress.getLocalHost(); System.out.println("Host and Address :"+ipadd); System.out.println("Host name :"+ipadd.getHostName()); String n=ipadd.toString(); System.out.println("IP address :"+n.substring(n.indexOf("/")+1)); } } |
sir i am making this project. so please send me all the details of this. thanku ...
sorry line no. 71...
in Line no. 73 there should be (ch == ')')...
u have wrote a wrong program .u have to big mistake in the program .u have writt...
If u want embedded project pls contact me. (with report&program). Unaiskavo...