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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "method overriding and visibility promotion." Watch "method overriding and visibility promotion." New topic
Author

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: http://aspose.com/file-tools
 
subject: method overriding and visibility promotion.
 
Similar Threads
JAVA Package Query
Overriding a method with Different Exceptions
how to use local & remote intefaces in ejb3
Instance of an abstract class
Stub cannot be cast to Interface