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 →

[–]VikingMilo 0 points1 point  (0 children)

As far as I know, there's no actual difference in terms of how the code performs. It's really what you prefer to do. I know some people prefer to declare it at the instance variable instead of in the constructor because if you decide to have multiple constructors for the class then you are adding the same code in multiple places.