Have we seen Objects before?

[comp1110-85]

Yes! Every string and array is an object. When we wrote guess.charAt(5), we were calling a method of the String class on the particular String object referred to by guess.

Similarly, the difference between arr.length for arrays and str.length() for strings is that the former is a field that we can access, and the latter is a method we have to call.

bars magnifying-glass caret-down plus minus arrow-right xmark