ConstructorParameterIsField
DRAFT

Misconception:

The formal parameters of a constructor are the instance variables of the class.

Incorrect

Formal constructor parameters are equivalent to instance variables

Correct

Formal constructor parameters are completely separate from instance variables

Correction
Here is what's right.

While there sometimes is a 1-to-1 mapping between the instance variables of a class and the formal parameter of its constructor, this is not a requirement, and the constructor’s parameters have a very different purpose than the instance variables.

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.