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