This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Aruna Balasuriya wrote:Then upon calling a start method of a thread object how a new method stack generated.
Why don't you take a look at Thread's sources..? It's in src.zip in our JDK installation folder! You will see that the method that starts the new thread of execution is a native method:
Joined: Nov 22, 2009
To simply put it, that is how the start method in the Thread class has been implemented.
You may implement your class to do anything that you like, but that doesn't mean that an instance of your class cannot be considered to be a regular object in java.
For example say that you have written a class which has a method that writes a record to a DB when that method is invoked. Would you not consider an instance of your class to be like any other object in Java?