aspose file tools*
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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.
Similar Threads
JAVA Package Query
Stub cannot be cast to Interface
Instance of an abstract class
Overriding a method with Different Exceptions
how to use local & remote intefaces in ejb3