Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How do I this?

  Asked By: Lewis    Date: Mar 27    Category: Java    Views: 565
  

I have a question. Bruce Eckel says in his book
"Thinking in Java":

**********************
It is also possible that your object might contain
other objects that contain data you’d like to modify.
For this, you just keep “connecting the dots.” For
example:

myPlane.leftTank.capacity = 100;

**********************

Now, how can I do this? I tried to do it by inner
classes but I failed. If someone could give me an
example program, I'd be very glad.

Share: 



Tagged: