*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Question about protected member Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Question about protected member" Watch "Question about protected member" New topic
Author

Question about protected member

Yin Stadfield
Ranch Hand

Joined: Oct 13, 2012
Posts: 35

Hi there folks,

So here is it:




How about if the subclass is within the same package as the superclass?



Thanks.
Praveen Kumar M K
Ranch Hand

Joined: Jul 03, 2011
Posts: 256
protected allows package-private access within a package.
Rakesh K. Cherukuri
Ranch Hand

Joined: Jun 01, 2010
Posts: 47

Yin Stadfield wrote:Hi there folks,
How about if the subclass is within the same package as the superclass?



To add to Praveen, that is allowed.


Warm Regards,
Rakesh
Yin Stadfield
Ranch Hand

Joined: Oct 13, 2012
Posts: 35

Cool. Thanks Praveen and Rakesh!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about protected member
 
Similar Threads
confusion of protected
Doubt about protected
Package Problem...
about package
confusion regarding protected keyword