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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "protected member" Watch "protected member" New topic
Author

protected member

Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521


why will this compile?

isnt x protected in B
how can it be accessed in other class?


scjp 1.6 91%, preparing for scmad
"Time to get MAD now.. we will get even later"....by someone unknown
Phungsuk Wangdu
Ranch Hand

Joined: Nov 04, 2009
Posts: 114
Hiii
raju protected members are accessible in to all classes in the package ,and is inheritable by any subclasses outside the package
Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
oh right.......i forgot that.....thanks a ton
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: protected member