packagechat;importjava.io.BufferedReader;importjava.io.InputStreamReader;importjava.net.ServerSocket;importjava.net.Socket;publicclassServer{publicstaticvoidmain(Stringargv[])throwsException{Queueq=newQueue();// Thread that queues messages from the local userKeyboardThreadkt=newKeyboardThread(q);kt.start();ServerSocketwelcomeSocket=newServerSocket(6789);SocketclientSocket=welcomeSocket.accept();// Thread that consumes local messages and sends them to the other userToOtherUserThreadous=newToOtherUserThread(clientSocket,q);ous.start();BufferedReaderinFromClient=newBufferedReader(newInputStreamReader(clientSocket.getInputStream()));while(true){System.out.println("FROM CLIENT: "+inFromClient.readLine());}}}