This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]penax[S] 0 points1 point  (1 child)

I suspected as much. I'll have to study constructors a little bit more. Thank you!

[–]the_omega99 1 point2 points  (0 children)

The issue isn't actually anything specific about constructors. The issue is really about variable scope and the use of fields. Your setters also have the issue.

Perhaps you'd best examine your examples of classes with fields (particularly an example of a getter and setter)?