Java OCA OCP Practice Question 1315

Question

Which of the following is a virtual method?

  • A. protected instance methods
  • B. static methods
  • C. private instance methods
  • D. final instance methods


A.

Note

In Java, only non-static, non-final, and non-private methods are considered virtual and capable of being overridden in a subclass.

Option A is the correct answer.




PreviousNext

Related