my local ip code example

Example 1: windows internal ip

//See your internal ip on any windows
Search -> Write:cmd -> command:ipconfig

Example 2: my ip

Always make sure not to give your public IP address to anyone who you DON'T trust

Example 3: how to find ip address

import java.net.InetAddress;
import java.net.UnknownHostException;
public class FindIPaddress {
	public static void main(String[] args) throws UnknownHostException {
		InetAddress a = InetAddress.getLocalHost();
		System.out.println(a.getHostAddress());	
	}
}

Tags:

Java Example