Multiple choice

Which of the following statements is correct?

i. Final methods can be overridden ii. Final methods cannot be overridden iii. Final fields are constants iv. Final variables can be changed

  1. i. and iv. both are true

  2. i. and iii. both are true

  3. ii. and iv. both are true

  4. ii. and iii. both are true

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

This answer is correct. Both the options are correct. Final methods cannot be overridden. Similarly, variables declared as final cannot be changed and are always constants.