JAVA program to print IP address

Posted On // Leave a Comment
import java.net.InetAddress;

class IP{
    public static void main(String[] args) throws Exception {
        System.out.print("IP address:"+InetAddress.getLocalHost());
    }
}

0 comments :

Post a Comment