Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the 'final' method in Java?
Answer: A 'final' method in Java cannot be overridden by subclasses. It is used to prevent modification of a method in a subclass.

Example:

class Parent {
  final void display() { /* method implementation */ }
}
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook