Answers for "Java program to find IP address"

16

minecraft server startup code

java -Xmx1024M -Xms1024M -jar SERVER_FILE_NAME.jar nogui
Posted by: Guest on August-05-2020
0

java get ip address

import java.net.*;

public class InetDemo{
	public static void main(String[] args){
		try{

			InetAddress ip=InetAddress.getByName("www.javatpoint.com");

			System.out.println("Host Name: "+ip.getHostName());
			System.out.println("IP Address: "+ip.getHostAddress());

		}
        catch(Exception e){System.out.println(e);}
	}
}
Posted by: Guest on June-20-2021

Browse Popular Code Answers by Language