Recently the IP address of my system as show by the ipconfig has changed from 10.2.200.76 to 10.2.200.75 but the IP address returned by the following java code
InetAddress.getLocalHost().getHostAddress()
is still 10.2.200.76. My question is, "how is that possible?" I'm speculating that something is wrong with the either DHCP or Java.
System Details - OS : Windows 7, Java : Oracle JDK 7, Ethernet Card : Intel(R) 82579LM Gigabit
Update 1: Java Code
public static void main(String[] args) {
try {
System.out.println("IP Address : " + InetAddress.getLocalHost().getHostAddress());
} catch (Exception e) {
e.printStackTrace();
}
}
Output of java code> IP Address : 10.2.200.76
Ipconfig Output: Output of ipconfig