mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-23 18:19:35 +08:00
0c4077f9c7
* libjava.lang/override.java: New file. * libjava.lang/override.out: New file. From-SVN: r59848
20 lines
391 B
Java
20 lines
391 B
Java
// 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());
|
|
}
|
|
}
|