Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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