Print My IP Address – Java Code
Objective: Write a java program to print your IP address.
- Get the local host address of your system using getLocalHost() method.
- Use getHostAddress() method to get the IP address from local host address.
IP ADDRESS is : 126.96.36.199
Top Companies Interview Questions..-
If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment.