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 microservices java?
What are struts java?
Which version of my browser should I use? : java security
Why java?
What is a dao layer in java?
What is javacpl?
Is java built on c?
Describe the principles of oops.
Can I have multiple main methods in the same class?
How do I install eclipse?
What happens when you omit a brace or misspell one of the words, like public or
What is map and flatmap?
Why bean class is used in java?
What is java ioc?
Is lambda expression an object?