I have 3 threads. 3 are going to do a different tasks , so different run() methods. How to overload run() method?
stephy1
0
Light Poster
Recommended Answers
Jump to PostYou can't. As I have told you here, simply assign some instance variable in the constructor and have the run method do different things based on the value of that/those variables.
The only other way is to write three different classes.
All 4 Replies
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
stephy1
0
Light Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
stephy1
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.