wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Assigning weaker privileges Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Assigning weaker privileges " Watch "Assigning weaker privileges " New topic

Assigning weaker privileges

Pratik D mehta
Ranch Hand

Joined: Jul 29, 2010
Posts: 121

What are the possible reasons that we cant assign weaker privileges to overridden methods in subclass ?

Understanding is Everything - Peter Lord
Bobby Smallman
Ranch Hand

Joined: Sep 09, 2010
Posts: 107
Subclasses must be usable as instances of their super. Reducing visibility would violate this contract.


Everyday in every way, we get a little better.
Pratik D mehta
Ranch Hand

Joined: Jul 29, 2010
Posts: 121

Thank you I got the visibility modifiers stuff .
I agree. Here's the link: http://aspose.com/file-tools
subject: Assigning weaker privileges
Similar Threads
my problem related to overriding
static method
interface problem
problem with implementing interface