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 aop(assepct oriented programing)?

811


Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

814


Where can I ask questions and make suggestions about seam?

859


In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?

2454


What are the different types of exception?

814


What is the relation between the infobus and rmi?

794


Will the general public have access to the infobus apis?

814


What is TL and its use?

2231


When a thread blocks on i/o?

823


Why use a datasource when you can directly specify a connection details?

793


What is local interface. How values will be passed?

796


int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!

1616


Why are some of the class and element names counter-intuitive?

842


How primary key is implemented in Oracle?

2172


hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me

2012