PPT Slide
class TwoThreads2{
public static void main(String[] args) {
Thread t1 = new Thread(new MyRunnable());
Thread t2 = new Thread(new MyRunnable());
t1.start(); t2.start();
}
}
class MyRunnable implements Runnable{
public void run() {
System.out.println("Thread started.");
}
}
Previous slide
Next slide
Back to first slide
View graphic version