You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractMethodCall.java 535B

123456789101112131415161718
  1. abstract class AbstractClass {
  2. public abstract void abstractMethod ();
  3. }
  4. public class AbstractMethodCall extends AbstractClass {
  5. /** @testcase PR591 PUREJAVA compiler error expected when directly calling unimplemented abstract method using super */
  6. public void abstractMethodCall () {
  7. super.abstractMethod (); // expecting compiler error: cannot access directly
  8. }
  9. public void abstractMethod() {}
  10. public static void main(String[] args) {
  11. new AbstractMethodCall().abstractMethodCall();
  12. }
  13. }