try {
if (args.length > 0) {
int port = Integer.parseInt(args[0]);
UDPEchoServer server = new UDPEchoServer(port);
server.start();
}
else {
UDPEchoServer server = new UDPEchoServer();
server.start();
}
}
catch (SocketException e) {
System.err.println(e);
}