wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes dot operator 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 "dot operator" Watch "dot operator" New topic
Author

dot operator

Anand Reng
Greenhorn

Joined: Feb 11, 2013
Posts: 8
Hi Folks,

In K&B book Chapter-1, page -70 - the two minute drill section says - "Members accessed without the dot operator (.) must belong to the same class.".
At the same time there is an example in page 34, where a protected int x=9 variable in parent class is used in the child class without a dot operator.
I understand this is because of inheritance. then, what am missing with the statement in two-minute drill?

Thanks in Advance for your time folks.

Reagrds,
Anand.
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 722
I think a child class is also a type of its parent class.
A child class belongs to its parent class.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dot operator
 
Similar Threads
finally clause question
Access Modifiers and Package 's
What extra can be done to do well on threads
Operators Doubt
What is a class and object?