packagemultithread;importjava.io.*;importjava.net.*;classMultiServer{publicstaticvoidmain(Stringargv[])throwsException{ServerSocketwelcomeSocket=newServerSocket(6789);while(true){SocketconnectionSocket=welcomeSocket.accept();// thread creation passing the established socket as argServerThreadtheThread=newServerThread(connectionSocket);// start of the threadtheThread.start();}}}