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)); } }
Description :
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Submit #Terms of Use
Copyright©2011 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com | Powered by Dhyeya
November 9th, 2011 at 8:48 am
where to buy Premier and Stitched Chicago Bears jerseys ??…
[...]we adivce go to this website to see more about Chicago Bears jerseys and others. [...]…