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 do you understand by numeric promotion?
How can one prove that the array is not null but empty?
What about 'hostile applets'? : java security
What is flatmap in java8?
Where is java installed?
Why serialization is used in java?
Are the actual permissions for the application defined at run-time or compile-time? : java security
Which is faster c++ or java?
What are the authentication modes in asp.net? : java security
How do I export a java project?
Can an application have multiple classes having main method?
How to reverse the singly linked list(In Node data members are(int data,int pointerTONext))
Can we extract main method from another class?
How do I know if I have jre or jdk?
What is class path in java?