0

hai i want to create 3 separate threads for different tasks in my program . how can i differentiate them in the run() method

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by ~s.o.s~
0

Create three different classes each of them implementing the Runnable interface, each of them having their own relevant run() method. Create a driver class which would create an instance of the three classes, pass the instance to the constructor of Thread, call the start() method of the thread and you are good to go.

Read this.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.