Refer to the substring method at Java String API
(http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#substring(int))
A String ".length()" method will return the number of characters in the string.
if you count "HELLO" from 0->4, it will still amount to 5 characters (the length), which is the number returned when you call "Hello".length().
If you want to access the last character of a String, use (Stringobj.length()-1); Accessing the last element of a String or Array through utilizing its .length() or .size() method calls is standardized across Java.