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 crud operations in java?
Can we extract main method from another class?
What is dto in java?
What is @qualifier in java?
What is a java singleton?
What is a flatmap?
Can I have multiple main methods in the same class?
What is a cookie in java?
Describe life cycle of thread?
Which instutute is offering course for rhino jain slee
Why is struts used in java?
What is static class in java?
What is the use of servlet in java?
What is jpa implementation?
what is the package for freshers in valuelabs.