If you want to compile the solution, you should be able to cut-and-paste the solution out of a Web browser window and into a text editing program.
(You can't cut-and-paste from the HTML source of the solution page, since it contains extra HTML markup commands that the Java compiler won't understand; the HTML markup does not appear when the page is displayed in a Web browser.) Exercise solutions are also available as a download from the front page of the web site.
Some of these programs use the standard output object, or Text IO.class must be available when you compile the program, and Text IO.class must be available when you run the program.
There is also a GUI version of Text IO; you can find information about it at the end of this web page.
Since this wouldn’t be part of Socket programming I’m leaving it untouched without getting into the details.
Additional points: This article is contributed by Aditya ch.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Prerequisites : Introducing threads in socket programming In the above article, a simple date time server was created which handled multiple user requests at the same time using threading.
The solutions to end-of-chapter exercises are not listed on this page.
It explains the basic concepts of threading in network programming.
The same concepts can be used with very slight modification to extend the above idea and create a chatting application similar to facebook messenger, whatsapp etc.
Hence I have separated the thread which does the reading work into Read Threadclass.
For leaving the group, any of the user can type in Exit to terminate the session. Socket programming is meant for distributed programming.