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

cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..

1744


what is meant by JRMP?

1815


What restrictions are placed on the location of a package statement within a source code file?

624


Which container method is used to cause a container to be laid out and redisplayed?

671


How are the elements of a borderlayout organized?

608






Is there a guarantee of uniqueness for entity beans?

574


Describe responsibilities of Activator?

1683


What do you need to set-up a cluster with jboss?

589


What is the difference between RMI and Corba?

2271


Which class is the immediate superclass of the menucomponent class?

643


Difference between loadclass and class.forname?

607


Explain what is orm?

682


What is prototype?

617


What is a policy?

1778


Difference between hashmap and hashtable?

614