StringLengthField
DRAFT

Incorrect

One can know the length of a String object by accessing its length field

Correct

One can know the length of a String object by calling its length method

Origin
Where could this misconception come from?

If students know about arrays, they might reason using an inappropriate analogy and thus believe that objects of class String have a length field (since arrays indeed have a final instance variable named length).

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.