aspose file tools*
The moose likes Beginning Java and the fly likes inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "inner class" Watch "inner class" New topic
Author

inner class

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1373
i have inner class. I did class level declaration and constructor level initialization. Method in the inner class is using constructor initialized values.
Where shall i initialize the values (within main class constructor (or) inner calss constructor) ??
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1373
Any update?
Ram Kumar Subramaniam
Ranch Hand

Joined: Jan 17, 2003
Posts: 68
That should be your call. However just keep in mind that the outer class's constructor would be called before the inner ones. So my suggestion would be to put in the outer class constuctor. The following should give you an idea.

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1373
Thanks Ram
 
Don't get me started about those stupid light bulbs.
 
subject: inner class