aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libjava/testsuite/libjava.lang/pr8823.java
blob: 3327ddf7a2a8d2f4652d775b0af1a6d05ebb7921 (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
interface I
{
  public void m();
}

abstract class A implements I
{
  // But doesn't define m()
}

public class pr8823 extends A // which means it implements I
{
  public static void main(String[] args)
  {
    // Defining c as either I or C will work.
    A c = new pr8823();
    c.m();
  }

  public void m()
  {
    System.out.println("Hello World!");
  }
}