when we applied start()method on a thread ,how does it know
that to execute run()method on that object?
Answers were Sorted based on User's Feedback
Answer / suma
When start method is called , JVM calls run method of this
object
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / 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 |
What is ioc concept?
Do we need to override service() method
What is a class loader? What are the different class loaders used by jvm?
Explain RMI Architecture?
Write a program to show synchronization?
Why won’t the jvm terminate when I close all the application windows?
Does Java pass arguments by value or reference?
what is heepStored?
what is a Daemon Thread?
What method is invoked to cause an object to begin executing as a separate thread?
What are the different approaches to represent an inheritance hierarchy?
How are the elements of a cardlayout organized?