How to build a high quality Client/Server Java application – a Java Chat Client/Server example Part4
March 20th, 2006Part1 , Part2 , Part3 , Part4 ,Part5
In the next example we will start 3 threads. Each thread will print a unique string and then go to sleep for set time and then print another string and so on. There are two ways to create a thread: One is to subclass the Thread class the other is to implement “runnable’. I will show you how to do it both ways. Most of the time you want to subclass a thread, but it some situations it is far easier to implement Runnable. For example when you have to pass a great amount of data to the thread class it may be easier to just create the thread in the class you are in.
Java,/client/server,course,chat,sockets,network
March 20th, 2006 at 3:14 pm
[...] , Part2 , Part3 ,Part4 [...]
April 5th, 2006 at 12:45 pm
[...] Part1 , Part2 , Part3 , Part4 ,Part5 [...]
April 10th, 2006 at 2:38 pm
[...] Part1 , Part2 , Part3 , Part4 ,Part5 [...]