summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing1002.java
blob: 69e2e1c31f8831e8b3ce565ae70f05786105b079 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Listing1002.java */

class Outer2
{
  public void print()
  {
    final int value = 10;

    class Inner2
    {
      public void print()
      {
        System.out.println("value = " + value);
      }
    }

    Inner2 inner = new Inner2();
    inner.print();
  }
}

public class Listing1002
{
  public static void main(String[] args)
  {
    Outer2 outer = new Outer2();
    outer.print();
  }
}