Java Programs
Sunday, January 12, 2014
Can we call run() method directly without start()
class Thread15 extends Thread
{
public void run()
{
System.out.println("running...");
}
public static void main(String surat[])
{
Thread15 t1=new Thread15();
t1.run(); //but, it doesn't start a separate call stack
}
}
output:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment