Immutable strings: contract (2)
Possible contract (continued):
/////////////// Accessors ///////////////
public int length (); // Return the length of this string.
public char charAt (int i); // Return the character at index i in this string.
public bool equals (String that); // Return true if and only if this string is equal to that.
public int compareTo (String that); // Return –1 if this string is lexicographically less than that, // or 0 if this string is equal to that, // or +1 if this string is lexicographically greater than that.