posted 14 years ago
Also, all collections have a size(). So if you work with arrays and Strings and collections, you need to remember whether to use length or length() or size(). Three ways to refer to basically the same concept. Why this unnecessary confusion?
Ultimately, I think this is one of those things where early on, when Sun engineers where developing the Java language and platform, some things were done quickly, under tight deadlines, that we might today consider, ummm, errors of judgement, or inconsistencies, or at least non-intuitive choices. If they did it again today, knowing what they know now, many things would be different. But history didn't happen that way, and today we're stuck with decisions made over a decade ago.