packagechatRoom;importjava.io.*;importjava.net.*;classClient{publicstaticvoidmain(Stringargv[])throwsException{Queueq=newQueue();// Thread that reads messages from stdin end queues themKeyboardThreadkt=newKeyboardThread(q);kt.start();SocketclientSocket=newSocket("localhost",6789);// Thread that reads the message from a client and queues it to be forwarded to other clientsToOtherUserThreadous=newToOtherUserThread(clientSocket,q);ous.start();BufferedReaderinFromServer=newBufferedReader(newInputStreamReader(clientSocket.getInputStream()));while(true){System.out.println(inFromServer.readLine());}}}