Given the code below:
Which of the following suggestions is correct? choose the best answer.
* You must override getPower on line 5
* You must override getPower on lines 2, 3, and 4 (for each constant)
* You must make getPower not abstract
* The code fails to compile on line 1
#java #certificationquestion #ocp
All enums implicitly extend java.lang.Enum.
Because a class can only extend one parent, the Java language does not support multiple inheritance of state.
And therefore an enum cannot extend anything else.
So the correct answer is "The code fails to compile on line 1".