Which of the following statement(s) is/are correct regarding JAVA programming?…

2021

Which of the following statement(s) is/are correct regarding JAVA programming? I. A class marked as final cannot be inherited. II. A method marked final cannot be overridden.

  1. A.

    Only I

  2. B.

    Only II

  3. C.

    Both I and II

  4. D.

    Neither I nor II

Attempted by 139 students.

Show answer & explanation

Correct answer: C

In Java, a class declared as final cannot be subclassed, making Statement I correct. Similarly, a method marked final prevents overriding in subclasses, validating Statement II as well. Therefore, both statements accurately describe the behavior of the final keyword.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs