[GR-Jug] inheritance ?
Jeremy Frens
jdfrens at calvin.edu
Mon Feb 2 21:55:46 EST 2004
On Feb 2, 2004, at 6:02 PM, Derek Vredevoogd wrote:
> But, I still have my original question concerning if modifiers affect
> inheritance.
Do these factoids at least partially answer your question:
final class: cannot be subclassed.
private method: subclass inherits it, but cannot access it directly.
Methods defined in the superclass can still get at it. Cannot be
overridden.
public & protected method: subclass inherits it, and can access it
directly, and can override it.
final method: subclass is not allowed to override it regardless of its
visibility.
An overridden method cannot have a more restrictive visibility; it
*can* have a more open visibility.
I'm just spitting out random facts I know about the modifiers and
inheritance. Is there a particular modifier you're interested in (like
"synchronize" which I know nearly nothing about)?
jdf
*** Jeremy D. Frens --- Professor of Computer Science --- Calvin
College ***
"Oh, for the love of puppies!" -- Ned Flanders, _The Simpsons_
More information about the Jug
mailing list