All pastes #983991 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-13 20:25 UTC
rendered paste body
public class Example1 { 
public static void main(String[] args) { 
MyThread t1 = new MyThread("A"); 
MyThread t2 = new MyThread("B"); 
MyThread t3 = new MyThread("C"); 
t1.start(); 
t2.start(); 
t3.start(); 
} 
} 
class MyThread extends Thread { 
private String message = "Hallo!"; 
public MyThread() {} 
public MyThread(String s) {message = s;} 
public void run() { 
for (int i = 1; i <= 5; i++) { 
System.out.print(message); 
} 
} 
}