What is the meaning of a final class and a final method? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

What is the meaning of a final class and a final method?

Is it possible that anyone can give me answer of this question.

2nd May 2017, 6:46 AM
Aijaz Ahmed
Aijaz Ahmed - avatar
2 Answers
+ 8
thanks for clear my confusion
2nd May 2017, 9:58 AM
Aijaz Ahmed
Aijaz Ahmed - avatar
+ 1
Final classes. A final class cannot be subclassed.  u can declare some or all of a class'smethods final. You use the final keyword in a method declaration to indicate that the method cannot be overridden by subclasses. The Object class does this—a number of its methods are final .
2nd May 2017, 8:08 AM
Aishwarya Murade
Aishwarya Murade - avatar