[GR-Jug] inheritance ?

Derek Vredevoogd Derek.Vredevoogd at requestfoods.com
Tue Feb 3 10:37:21 EST 2004


OK.  Great Thanks a lot Jeremy.
I've never used some of those last modifiers either.
Just thought I would through them in the mix since they exist.
The best reference I've found is the 
"Java Complete Java 2 Certification Study Guide"
It mentions a lot of the things you said here.
Unfortunately, it doesn't mention much about it.
Let me know if you find a book that explains it.

THanks again.

-----Original Message-----
From: Jeremy Frens [mailto:jdfrens at calvin.edu]
Sent: Monday, February 02, 2004 9:56 PM
To: Grand Rapids Java Users Group Mailing List
Subject: Re: [GR-Jug] inheritance ?


You are a member of the Grand Rapids Java Users Group mailing list.  
Please see the bottom of this message for information on
unsubscription/customizing your preferences.

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_

_______________________________________________
Jug mailing list
Jug at gr-jug.org
Un/Subscribe/Customize http://gr-jug.org/mailman/listinfo/jug



DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorized.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.




More information about the Jug mailing list