summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing2201.java
blob: c4845898280ef01b5482baf15b1fb96670c3d607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Listing2201.java */

class MyThread2201
extends Thread
{
  public void run()
  {
    int i = 0;
    while (true) {
      System.out.println(i++);
    }
  }
}

public class Listing2201
{
  public static void main(String[] args)
  {
    MyThread2201 t = new MyThread2201();
    t.start();
  }
}