calling my own thread

Hi,

I have few questions calling my own thread.

publicclass Aimplements Runnable

{

Thread t;

class A

{

t=new Thread();

t.start();

}

publicvoid run()

{

// Some code goes here

// I want to restart Thread t again from here.

}

publicclass B

{

// How do I start Thread t in class A from this class

new A();

// will the above statement work

}

Thanks for your replies and suggestions,

@debug

[1199 byte] By [@debuga] at [2007-11-26 18:16:31]
# 1

Why not do this instead:

public class A

{

Thread t = new Thread(new Runnable{

public void run()

{

// Some code goes here

}});

t.start();

}

MeTitus

Me_Titusa at 2007-7-9 5:50:05 > top of Java-index,Java Essentials,New To Java...