import java.io.IOException; import java.net.ServerSocket; public class While{ public static void main(String[] args) throws IOException { ServerSocket serverSocket = new ServerSocket(1234); while (true){ System.out.println("Server is listening"); new ChatRoomServer(serverSocket.accept()); } } }