• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inner class

 
kri shan
Ranch Hand
Posts: 1473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any update?
 
Ram Kumar Subramaniam
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic