can You help me , i have K&B book and i gave one of my friend this book for prepation on returing the book she lost softcopy so i dont have any soft copy of the mock test whic is provided in this book , if you are having this book mock test softcopy can you send me in the mail because you are also preparing from mock test
The method getXXX is clearly having default Modifier. So Class B will not extend that method (dosent come under the inheritance chain).
Your first posting here?
Welcome to the Ranch!
What are you meaning with class B not extending that method? Clearly class B inherits that method.
If you want to override it, visibility cannot be reduced. The method in A has got package visibility. With protected the visibility is higher, as it is visible not only in the same package but also in classes in other packages that extend A. I admit that the terminus protected is a bit misleading as one may think the visiblilty may be lower than default.
Only one small issue "kishore": The Java Ranch follows a certain policy regarding user names. The main reasons why and a link how to change yours you'll find here: http://www.javaranch.com/name.jsp
So, could you please change your user name before your next posting? It will not affect anything you've already posted here. Just your user name will update.
all events occur in real time
His brain is the size of a cherry pit! About the size of this ad: