Up until Java SE 5.0 the length() method on a String used to give you the correct length of a String. Now that 5.0 uses additional chars to store character information, (ie a character may take more that 1 char of storage in memory), there is an aditional method, codePointCount(), that now accurately returns characters in a String.