Mine
public text v1 · immutable
import java.io.*;
import java.net.*;
import static java.lang.System.out;
class Server {
public static void main(String args[]) {
ServerSocket serverSocket;
try {
serverSocket = new ServerSocket(72);
} catch (IOException e) {
die("Could not listen on port 72!");
}
Socket clientSocket = null;
try {
clientSocket = serverSocket.accept();
} catch (IOException e) {
die("Could not accept connection!");
}
}
public static void die(String text) {
out.println(text);
System.exit(0);
}
}