For variable FINAL means that variable value cannot be changed. Please tell me what does FINAL implies for method and class. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

For variable FINAL means that variable value cannot be changed. Please tell me what does FINAL implies for method and class.

7th May 2019, 4:22 AM
mohan borkar
mohan borkar - avatar
2 Answers
+ 1
A final method in a base class denotes that the method cannot be overridden by classes which inherit from the base class. A final class simply cannot be extended/inherited from.
7th May 2019, 4:25 AM
Fermi
Fermi - avatar
0
Cannot be overidden (for method) means what? if we create a child class, with the same method name (of parent class), in that child class, then there does not exit polymorphism kind of thing in that child class with regard to that method?
7th May 2019, 10:30 AM
mohan borkar
mohan borkar - avatar