From the <<SCJP 5 Study Guide>> book Page 162, Qn 11. In case you don't have the book, here is the code:
This code compiles fine.
I am really confused by the access to 'y' in Minor's constructor( the line super(y); ), how do you explain it? My understanding is, y is static in Uber class and is not inherited in class Minor 'coz it is static. but if I change it to super(Minor.y);, it still compiles.
Originally posted by warren li: so you mean static variables/methods are also inherited? this is rather contrary to my belief.
Well, you'd best update your belief by reading the language specs or a good book! The access to static fields and methods is controlled by their access specifier, exactly like member fields and methods.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.