Program : To display the IP Address of a particular Host
By : Kapil Lohia
import java.net.*; import java.io.*; public class ip_host { public static void main(String args[]) throws Exception { System.out.println("Enter the host name :"); String n=new DataInputStream(System.in).readLine(); InetAddress ipadd =InetAddress.getByName(n); System.out.println("IP address :"+ipadd); } } |
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 #Resources #Terms of Use
Copyright©2012 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com