Java threads perform their task in the run() function, which is initiated with the start method.
Here is an example:
Thread t = new Thread( new Runnable(){
public void run(){
System.out.println(" do some work");
}
});
t.start();
Thread t = new Thread( new Runnable(){
public void run(){
System.out.println(" do some work");
}
});
t.start();