• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

method overriding and visibility promotion.

 
Rashid Mian
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Anton Uwe
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic