I've never used package-private access controls, but, still, Google
should land you the answer you want.

A "private" member (explicitly declared so by the "private" modifier)
is different from a "package-private" member (which has no modifier).

For more details:
http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html


On Dec 21, 12:43 pm, "Manjula Srinivas" <talk2manj...@gmail.com>
wrote:
> Hi Sang,
>
>  In the tutorial "Java programming", In the presentation "Inheritance"
>
> In Silde 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
>
> In Silde 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.
>
> In first slide it say sub class can inherit private member of super
> class. In second slide it say "private" cannot be inherited.
>
> Can you please clarify this.
>
> Thanks,
> Manjula

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to