I had to write this program to output the first letter of a first name and the first five letters of the last name plus a random number from 10-99. It works but I thought that t
Java's substring inputs,
public String substring(int beginIndex,int endIndex)
beginIndex - the beginning index, inclusive.
endIndex - the ending index, exclusive.
Note the exclusive. substring(0,1) will return a string including character 0, up to but NOT including character 1.
Source: http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#substring(int, int)
I hope you can better understand with this example: