Multiple choice

Which of the following statements is true regarding final keyword in Java?

  1. A final class can be extended by another class.

  2. A final method can be overridden when its class is inherited.

  3. A final variable's value cannot be changed.

  4. The keywords final and finally have the same meaning in Java.

  5. Final class can be abstract in Java.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct answer. A final variable is equivalent to a constant. Once a value is assigned to it, it cannot be changed.