Java code which will create a server thread communicating with 200 clients

Viewed 24

Write a java code that will create a server thread communicating with 200 clients.

I have been provided with two templates one for main and one for severthread

Main.java (template)

public class main { 
      Public static void main(string[] args) {
            ServerThread thread = Thread("Server1");
            thread.();
      }
}

ServerThread.java (template)

Public class ServerThread extends Thread
{
     Public ServerThread()
     {
        this(threadName);
      }
      Public void run()
      {
          int = 1;
          while()
          { 
            System.out.println(this.getName() + " sent data to client: " + clientNumber);
            clientNumber++;
          }
      }
}

please help how do I finish this code

0 Answers
Related