Im not sure, but the way its said, "package-private", sounds like "protected" 
modifier... or other scope modifier that only permits you to extend from that 
class if you are in the same package. Doesn't mean private... once private 
attributes can never but in its own class.


> Date: Mon, 1 Jun 2009 00:04:06 -0700
> Subject: [java programming] Lab 1023: Question on Inheritance lecture
> From: [email protected]
> To: [email protected]
> 
> 
> Hello all,
> 
>         I am a little bit confused with the concept of inheritance. In
> the lecture provided for Lab 1023,
> in slide 9
> "If the subclass is in the same package as its parent it also inherits
> the package-private members (fields
> or methods) of the parent"
> 
> and in slide 10
> 
> "A subclass does not inherit the private members of its parent class.
> However, if the super class has public or protected methods for
> accessing its private fields, these can also be used by the subclass."
> 
> I guess child class doesn't inherit the private member of the parent
> class then what does  this potion means "subclass is in the same
> package as its parent it also inherits the package-private members".
> Cheers
> 
> > 

_________________________________________________________________
Emoticons e Winks super diferentes para o Messenger. Baixe agora, é grátis!
http://specials.br.msn.com/ilovemessenger/pacotes.aspx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to