mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 12:19:27 +08:00
1d9033cb3f
* libjava.lang/pr8823.java: New file. * libjava.lang/pr8823.out: New file. From-SVN: r59953
25 lines
361 B
Java
25 lines
361 B
Java
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!");
|
|
}
|
|
}
|