An example of the other way
public class Bogus2 {
public static void main (String[] args) {
Thread t = new Thread(
new Runnable() {
public void run() {
int i = 0;
while (!Thread.interrupted()) {
System.out.println(i++);
}
}
});
t.start();
try { Thread.sleep(50); } catch (InterruptedException ie) {}
t.interrupt();
}
}
And, BTW, there's no reason why the methods can't be combined (directed at the OP, not you Norm).