need help ,what is wrong whit my code
package com.codegym.task.task30.task3008;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class Server {
private static class Handler extends Thread {
private Socket socket;
public Handler(Socket socket) {
this.socket = socket;
}
}
public static void main(String[] args) throws IOException {
int port = ConsoleHelper.readInt ();
java.net.ServerSocket serverSocket = new ServerSocket ( port );
System.out.println ( "Server is running" );
while(true){
Socket socket = null;
try {
socket = serverSocket.accept ();
Thread handler = new Handler ( socket );
handler.start ();
}catch (Exception o){
socket.close ();
System.out.println ("Error" + o );
}
}
}
}