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



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

Answer / suma

When start method is called , JVM calls run method of this
object

Is This Answer Correct ?    7 Yes 0 No

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

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

Post New Answer

More Advanced Java Interview Questions

How we set Bean Id when we are creating web application using SpringMVC and Hibernet Integration

1 Answers  


Do we need to override service() method

0 Answers  


difference. between List and Set?

2 Answers   Campus Interaction, HCL, Infotech,


which is the better collection class if the requirement is only displaying the data

1 Answers  


difference between apllet and interface class

1 Answers   Infotech,






what are JSP tags? what is difference between include action and directory?

0 Answers   ADP,


What are the disadvantages of using threads?

3 Answers   Oracle, SFS,


In howmany ways a thread can be created?

3 Answers   HCL,


What is ripple effect?

0 Answers  


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

0 Answers  


How are the elements of a cardlayout organized?

0 Answers  


Will it be called overriding if I do not change the parameters or return type, instead throw a different exception in the method signature.

4 Answers   HeadStrong,


Categories