Which of the following statement is/are correct regarding JAVA programming?
Which of the following statement is/are correct regarding JAVA programming?
I. A class marked as final cannot be inherited
II. A method marked final cannot be overridden
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
In Java, a final class cannot be subclassed and a final method cannot be overridden. Both are correct.