Java OCA OCP Practice Question 1447

Question

Which of the following statements are true?

Select 2 options

  • A. private keyword can never be applied to a class.
  • B. synchronized keyword can never be applied to a class.
  • C. synchronized keyword may be applied to a non-primitive variable.
  • D. final keyword can never be applied to a class.
  • E. A final variable can be shadowed in a subclass.


Correct Options are  : B E

Note

final class means the class cannot be subclassed.

final method means the method cannot be overridden.

final method can be overloaded.

final variable means that the variable is a constant.




PreviousNext

Related