Possible errata in Practice Exam 2, OCA: Oracle Certified Associate
Java SE 8 Programmer I Study Guide: Exam 06Z0-808
There is a question about true statements regarding
String and StringBuilder. One of them is:
For a
StringBuilder, capacity would be a redundant property.
The exam scores that statement as false. I say that the statement is true, because you already have access to the capacity() method. You could use the capacity() method without ever needing the capacity property. Hence, adding a property for capacity adds no value, and is superfluous/redundant. This may be a matter of semantics, but I think that my answer deserves credit.