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
how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.
Why do I get a duplicate name error when loading a jar file?
Why use a datasource when you can directly specify a connection details? (in a J2EE application)
When a thread blocks on i/o, what state does it enter?
What are the difference between RMI and CORBA?
What is the difference between a menuitem and a checkboxmenuitem?
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!
Which javutil classes and interfaces support event handling?
If your ui seems to freeze periodically, what might be a likely reason?
What is a sessionfactory? Is it a thread-safe object?
Explain what is orm?
What is the difference between java class and bean?
why static class in java
Explain the steps in details to load the server object dynamically?
How are the elements of a cardlayout organized?