Final Variables and Methods »
By Ramakrishna on Oct 27, 2008 in define final variable and method | 0 Comments
All methods and variables can be overridden by default in subclasses. If we sish to prevent the subclasses from overriding the members of the superclass, we can declare them as final using the key word final as a modifier . Example: final int size=100; final void show(){…….} Making a method final ensures that the functionality [...]
