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?
- A.
abstract
- B.
virtual
- C.
override
- 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).