import java.net.InetAddress;
import java.net.UnknownHostException;
public class Program {
public static void main(String[] args) {
try {
InetAddress localMachine = InetAddress.getLocalHost();
System.out.println("Hostname of local machine: " + localMachine.getHostName());
} catch (UnknownHostException e) {
System.err.println("Unable to determine local host: " + e.getMessage());
}
}
}
/*
run:
Hostname of local machine: prod-repl-java-90871g9513-8oq10
*/