In Java, which keyword is used to declare an abstract method within an…

2025

In Java, which keyword is used to declare an abstract method within an abstract class?

  1. A.

    abstract

  2. B.

    virtual

  3. C.

    override

  4. D.

    implement

Attempted by 405 students.

Show answer & explanation

Correct answer: A

The question is specifically about Java.

In Java, an abstract method is declared using the abstract keyword. Such a method has no body in the abstract class and must be implemented by any concrete subclass.

virtual is not a Java keyword. @Override is an annotation used when a subclass provides an implementation. implement is not the keyword for abstract methods; implements is used for interfaces.

Correct Answer: Option A (abstract).

Explore the full course: Bpsc