What do you mean by final class and final method?

Final classes cannot be subclassed; it is not open for change and can be used reliably for common execution of routines. “String” class in Java is an example of a final class. This is done for security and sometimes for efficiency.


Final methods cannot be overridden. They are not open to change. This prevents accidental changes which may result in crashing of application.

Suggest An Answer

No suggestions avaliable!

Latest post from Full stack developer interview questions

Ask Question