when we applied start()method on a thread ,how does it know
that to execute run()method on that object?

Answer Posted / sushant

Thread in a java inbuilt Object.
So if you are implementing threads in your system by using
Thread class or runnable interface, the JVM will look at
that and keep an eye on your code. As soon as you call the
start method it will go and call the run method on its own.
The funda here is that this is something that the JVM if
fully responsible of handling.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by method chaining?

894


If your ui seems to freeze periodically, what might be a likely reason?

782


How to implement RMI in Java?

2631


What is an abstract method?

799


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

859


Is a class a subclass of itself?

840


What’s jboss jbpm?

768


Which class is the immediate superclass of the menucomponent class?

921


How will you pass parameters in RMI? Why do you serialize?

927


What are the different methods of identifying an object?

790


why static class in java

1492


whats is statement and procedure

1819


What is the purpose of the notify() method?

831


Explain the different types of memory used by jvm?

867


what is an isolation level?

2456