Mike. J. Thompson wrote:I would add a constructor to your first class and use that to set the variables. That way the object will be immutable, which is normally a good thing.
I did what you said, do you mean this?
I don't know when I should initialize
object in declaration and when I should
not (like above).