Q:

Java substring on delimiter not using split or regex

I have a separate test class that is going to pass in a string with a high value and low value with a : in between, representing numbers 0-6. An example is "6:2". I need to separate these numbers based on the : delimiter, but my professor does not want me to use split or any regex.
public class DominoHighLowImpl_Laursen implements Domino {

public static final String HIGH_LOW_STRING_SEPARATOR = ":";

public DominoHighLowImpl(String highLowString) 
{

}

So typing 
String substr = highLowString.substring(highLowString.indexOf(HIGH_LOW_STRING_SEPARATOR) + 1);  

returned the number after the delimiter as I expected
BUT
String substr = highLowString.substring(highLowString.indexOf(HIGH_LOW_STRING_SEPARATOR) - 1);

does not return the number before the delimiter. What am I doing wrong on the last part?

A:

Check substring(int beginIndex) and substring(int beginIndex, int endIndex):
String high = highLowString.substring(0, highLowString.indexOf(HIGH_LOW_STRING_SEPARATOR));
String low = highLowString.substring(highLowString.indexOf(HIGH_LOW_STRING_SEPARATOR) + 1);

