Java tutorial
class ThreadDemo implements Runnable { Thread t; ThreadDemo() { t = new Thread(this); t.start(); } public void run() { System.out.println(t.toString()); } } public class Main { public static void main(String[] args) { new ThreadDemo(); } }