• Post Reply Bookmark Topic Watch Topic
  • New Topic

InetAddress and getLocalHost  RSS feed

 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
what is InetAddress and getLocalHost? If somebody can explain me with example. Do we have write IP address in InetAddress or not?
Thanks in advance,
Angela
 
aarti sharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to get the IP address of your machine u can use getLocalHost()
eg.
InetAddress l=InetAddress.getLocalHost();
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!