File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: protected member
 
Similar Threads
which can method2 can access without reference?
inheritance and variables
Sierra/Bates, page 136
abstract class and protected member behaviour
Inheritance question