What is the effect of declaring a Java class final?
Correct answer A. It cannot be subclassed
Explanation
A final class may not appear in another class's extends clause, which is why classes such as String cannot be subclassed. Objects of a final class can be created normally, and its fields are not made constant automatically. Its methods are effectively final because no subclass can exist to override them, but they stay instance methods.
Answer checked How we write and check questions
Discussion