Check Local Host IP Address in Java

By | February 26, 2016

Check Local Host IP Address in Java Programming

Here, you shall learn How to Check Local Host IP Address in Java Programming that you’re currently logged in. Read below to know what is an IP Address. This Java Program is an IP Address Tracker Program wherein you can get the IP Address of your Local Host System by executing this IP Address Java Program.

What is an IP Address?

IP stands for Internet Protocol Address. It is a 32-Bit Address String and is also commonly known as IPv4 (Internet Protocol Version 4).


IP Address is a Numerical Tag associated with every Electronic Device such as Printer, Laptop, Desktop, Mobiles, etc that helps to identify every single device connected to a Network. It is primarily used for Communication with different devices connected onto the same Network.

Local Host is the Host Name of your System. Almost everytime, the Local Host Address is 127.0.0.1 which is the Ipv4 Loopback Address.

Also Read: Java Program To Check Public IP Address


How Does This Program Works?

InetAddress Class provides the facility to Check IP Address in Java Programming. It has a pre-defined method getLocalHost() that helps to get the Local Host IP Address. Local Host IP Address is 127.0.0.1 which is also known as Loopback Address.


Check Local Host IP Address in Java Programming Language

Also Read: Java Code To Find Perfect Numbers

Output

How To Check Local Host IP Address in Java Programming Language

To know more about IP Addresses, Refer WikiPedia. You can also check your IP Address on WhatIsMyIPAddress when you’re Connected to the Internet. We hope that you got a basic information about How To Check Local Host IP Address in Java Programming Language.

Let's Discuss