Java OCA OCP Practice Question 1724

Question

Which statements about modifiers are true?.

Select the two correct answers.

  • (a) Abstract classes can declare final methods.
  • (b) Fields can be declared native.
  • (c) Non-abstract methods can be declared in abstract classes.
  • (d) Classes can be declared native.
  • (e) Abstract classes can be declared final.


(a) and (c)

Note

Abstract classes can declare both final methods and non-abstract methods.

Non-abstract classes cannot, however, contain abstract methods.

Nor can abstract classes be final.

Only methods can be declared native.




PreviousNext

Related