Program 19.1: BytePrinter
Program 19.1 is a threaded class that prints the numbers between -128 and 127.
public class BytePrinter extends Thread {
public void run() {
for (int b = -128; b < 128; b++) {
System.out.println(b);
}
}
}
Copyright 1996 Elliotte Rusty Harold
elharo@sunsite.unc.edu
This Chapter
Examples
Home