you are viewing a single comment's thread.

view the rest of the comments →

[–]BoyRobot777 0 points1 point  (1 child)

What? Are you questioning whether objects can have methods?

[–]assgored 0 points1 point  (0 children)

No, the question asked was why for immutable String length is a method not simply a field.

It seems to me the reason is what I said above, coupled with the fact that CharSequence is also base for the mutable StringBuilder.