cant we call run() method directly instead of calling indirectly through the start()
method ? if we do so then what is the problem ?
Answer Posted / damodar narayan
Calling run() method is just like calling a method in java. So when called, it just gets executed but "we do not get the thread functionality by calling the run() method". But calling start() method registers your program with the thread scheduler and hence it achieves the threading functionality. Start in turn calls the runs method.
Hope its clear.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is data encapsulation?
In which language eclipse is developed?
1.can i use super keyword in normal class(not inheritance) to call any method?if so how can i call particular variable? 2.In the inheritance how can i access the particular variable from the base class(it containing 5 variables) using super keyword?
What is orm in java?
What are the risks in java security? : java security
What is a java executable jar file?
What is messaging queue in java?
Which is faster c++ or java?
What is @qualifier in java?
What is the difference between ec2 and lambda?
What java systems libraries and methods are available for me to use?
Explain different way of using thread?
What are java’s rules regarding tabs, spaces and newline characters?
What are messages in java?
What is dialect in java?