summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/pr21844.java
blob: 24ed01fce9fafbadde9cfc5e648bf6a8dc38ed80 (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
30
31
32
33
class pr21844base
{
  int modCount;

  public pr21844base(int x)
  {
    modCount = x;
  }
}

public class pr21844 extends pr21844base
{
  class inner
  {
    public int doit ()
    {
      ++modCount;
      return modCount;
    }
  }

  public pr21844(int x)
  {
    super(x);
  }

  public static void main(String[] args)
  {
    pr21844 val = new pr21844(7);
    inner i = val.new inner();
    System.out.println(i.doit());
  }
}