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
Why we use beans in java?
explain how java se 8 data and time api solves issues of old java date api?
What is an actionevent in java?
What is java language expression?
What is maven in java?
What is persistence xml in java?
What is hql in java?
What is @override annotation in java?
What is lazy loading in jpa?
Is it better to learn java or python?
Which is best framework in java?
What is native api in java?
What is the use of lambda functions?
What are tlds in java?
What is stateful in java?