Skip to main content

Featured

Game Development Tutorials In Android

Game Development Tutorials In Android Hi Guys,                 We are shortly started Game Development Tutorials in Android Studio. So everyone supports me and share this blogs to your friends. Guys, At this time everyone is freely available to source code and we are provide a video for step by step game developments. you are learn free and feel free to support us. Guys, if you have any question to me, so feel free to comment us. I will try to answer all the question as long as possible.                                                     Thank's                                                                          ...

How To Get IPAddress Of Java Program

How To Get IPAddress Of Java Program

                              An IP Address is important is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. It's very important to any host computer...


Example Program for Getting IP on Local Computer


                                                     IPAddress.java

import java.net.*;
import java.io.*;

public class IPAddress 
{

  public static void main(String[] args)
  {  
try
{  
InetAddress ip = InetAddress.getLocalHost();
System.out.println("IP Address: "+ip.getHostAddress());  
}
catch(Exception e)
{
System.out.println(e);
}  
  }  

}


Compile : javac IPAddress.java

Run : java IPAddress

If this information is important to you , and you want to , I will continue writing some more details of Android Programming Language, so click on the advertising, available on this page. This is motivate me for writing some more useful stuff, Thank's 

Comments