Choose the incorrect statement –

2022

Choose the incorrect statement –

  1. A.

    If a method is declared as final, that method cannot be overridden in sub class.

  2. B.

    Finalize() is a method of Java, which is called by garbage collector before removing an object from memory.

  3. C.

    If a class is declared final, it cannot be inherited. If you do so it will give you compile-time error.

  4. D.

    If we declare any variable as final, the value of the variable can be modified in final method.

Attempted by 123 students.

Show answer & explanation

Correct answer: D

He incorrect statement is Option 4. If a variable is declared as final, it becomes a constant. Its value can be assigned only once and cannot be modified later, regardless of whether you are inside a final method or any other part of the code.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs