OnJava8-Examples/concurrency/BasicThreads.java
Bruce Eckel 88dbdbbbcb update
2015-05-18 23:05:30 -07:00

14 lines
386 B
Java

//: concurrency/BasicThreads.java
// The most basic use of the Thread class.
public class BasicThreads {
public static void main(String[] args) {
Thread t = new Thread(new LiftOff());
t.start();
System.out.println("Waiting for LiftOff");
}
} /* Output: (90% Match)
Waiting for LiftOff
#0(9), #0(8), #0(7), #0(6), #0(5), #0(4), #0(3), #0(2), #0(1), #0(Liftoff!),
*///:~