summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/override.java
blob: 94bb09cfc0d15e4257aa555b087505bd6e120417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Regression test that overrides a virtual method with a final one.

class override1
{
  public int x1 () { return 3; }
}

public class override extends override1
{
  public final int x1() { return 5; }
  public final int x2() { return 7; }

  public static void main(String[] args)
  {
    override z = new override();
    System.out.println(z.x1());
    System.out.println(z.x2());
  }
}