i think/read, Every program import java.lang package which Provides classes that are fundamental to the design of the
Java programming language.In java.lang package there is one interface called Runnable which description is "The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread."
The Runnable interface should be implemented by any class whose instances are intended to be executed by a
thread. The class must define a method of no arguments called run.
In this Interface Runnable there is method Run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
The general contract of the method run is that it may take any action whatsoever.
when we write public class t extends Thread {
Thread.java which we extend for class t, & in this Thread.java folowing code is written
/* from this i started thinking*/ So when we call t.start() it goes to if condition call start0(), then in start0() we call target.run(), target is our class t.
therefore When we start a thread by using t.start(), it knows that to execute run()method.
is my thinking & study is right?
[ July 14, 2008: Message edited by: Mandar Khire ]