+ 6
I dont know what i have done
import java.net.InetAddress; public class Program { public static void main(String[] args)throws Exception { System.out.println(InetAddress.getLocalHost()); } }
2 Respuestas
+ 2
you just imported class inerAddress that has a method getLocalHost(),,,which prints the host name and IP address of your local machine
+ 1
It prints the host name and IP address of the computer it's running on.