b) void run() - It should get a SocketThread object via the getSocketThread() method and call its run() method. Figure out we don't need to call the run() method on a separate thread, like we did for the console-based client.
Why do we call run instead of start? Thank you
Why don't we need to start new thread?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
DS
24 April 2020, 08:58
When we call start() method the Java Virtual Machine calls the run() method of this thread. Since run() method is overridden we call run() in SocketThread object
+2