This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
Similar Threads
which can method2 can access without reference?
Sierra/Bates, page 136
inheritance and variables
Inheritance question
abstract class and protected member behaviour