Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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. }