OOPs Concepts
Programming and Technical
Programming
Definition
What is final modifier?
Read Solution (Total 3)
-
- final can be used in 3 ways
1.variables,constants are final:we cannot change the value during the execution.
2.methods are final:if we mention method as final we cannot extend that method.
3.classes are final:if we mention the class is final we cannot inherit the properties of that class. - 9 years agoHelpfull: Yes(0) No(0)
- Final variable cannot be changed and final classes cannot be inherited
- 9 years agoHelpfull: Yes(0) No(0)
- final int a=9;//means value of a cannot be modified
final class xyz{}// means this class cannot be inherited
final public void display()// means this method cannot be overriden - 9 years agoHelpfull: Yes(0) No(0)
OOPs Concepts Other Question