title: How can I get the size of an array, a Collection, or a String in Java?
body: <p>What are the different ways that I can access the length of an array, a collection (<code>List</code>, <code>Set</code>, etc.), and a <code>String</code> object?  Why is it different?</p>