Hai Frank,
Even if the control comes/exits out of the main method, the thread continues to run. As it is main method itself is a seperate thread in
Java. Only if u call the exit method explicitly as below, the thread will stop running (All the threads initiated by the program will stop).
<code><pre>public class ThreadRun implements Runnable
{
public void run()
{
for( ; ; )
{
System.out.println("Thread Running");
}
}
public static void main(
String a[])
{
Thread t = new Thread( new ThreadRun());
t.start();
System.exit(0);
}
}</pre></code>
[This message has been edited by Jim Yingst (edited February 19, 2000).]