Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inner classes in the Data.java

 
Krzysiek Hycnar
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This's been my first post here (I previously posted to SCJP and SCWCD forums)

I've got a question on using inner classes in SCJD assignment, namely - do I have to generate accessor/mutator pair for every property of an inner class or it's acceptable to utilize the special relationship that is between inner and outer class and use them in a regular manner ex. inner_class_instance.inner_class_property ??

Regards
Krzysiek
 
Frank Hardy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Krzysiek,

I use inner classes too (I like them ) and I'm also unsure about this. Most of my inner classes are private and used as pure data structures. Hence, most of their member attributes are final and then I used not to implement the accessor methods for these attributes. I described it in the java doc. I hope this may satisfy the examiners.

Greetz,

Franky.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic