What is the purpose of the "final" keyword in Java?
A. To indicate that a variable or method cannot be modified or overridden.
B. To indicate that a class cannot be extended.
C. To indicate that a variable or method can only be accessed from within the same class.
D. None of the above.
Answer:A
What is the purpose of the "final" keyword in Java?
A. To indicate that a variable or method cannot be modified or overridden. B. To indicate that a class cannot be extended. C. To indicate that a variable or method can only be accessed from within the same class. D. None of the above.