This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
Stub cannot be cast to Interface
Instance of an abstract class
how to use local & remote intefaces in ejb3
Overriding a method with Different Exceptions
JAVA Package Query