Java OCA OCP Practice Question 1316

Question

Which declares an abstract method in an abstract Java class?

  • A. public abstract method();
  • B. public abstract void method();
  • C. public void abstract Method();
  • D. public void method() {abstract;}
  • E. public abstract void method() {}


B.

Note

The abstract keyword must precede the method's return type.




PreviousNext

Related