What is final keyword?
It is similar to constant in C.Once the value is defined the value can't be changed.If we try to change the value then the program does not executes.If the parent class is preceeded with final keyword than the base class cannot be inherited in derived class.If the method is preceeded with the keyword final than the method cannot be inherited in derived class.So we can restrict the method from overriding.

0 Comments:
Post a Comment
<< Home