File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes method overriding and visibility promotion. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "method overriding and visibility promotion." Watch "method overriding and visibility promotion." New topic

method overriding and visibility promotion.

Rashid Mian
Ranch Hand

Joined: Feb 14, 2007
Posts: 31
Anton Uwe
Ranch Hand

Joined: Jan 10, 2007
Posts: 122
Well, for the compiler, "superClass" has no method "smile(..)" because "smile(..)" in SuperClass was defined to be protected and we are in a different package than SuperClass is in, and we are not in a class inheriting from SuperClass. So, the compiler doesn't "see" "smile(..)".
I agree. Here's the link:
subject: method overriding and visibility promotion.
It's not a secret anymore!