can we inherit a final method from the subclass? Say i have a mehtod in Class A with is final. I have a class B which extends Class A.will the final method in the class A be inherited in class B.??
Sure. You just can't change a final method or field. Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Unless of course the method is private final. (Or package private, i.e., not public, protected, or private, and the superclass and subclass are in different packages.) Then it can't be called by the subclass. Of course, that's true for any method, final or not.
Lasagna is spaghetti flvored cake. Just like this tiny ad:
a bit of art, as a gift, the permaculture playing cards