I hope you can better understand with this example:

I hope you can better understand with this example:

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)
[JAVA] Substring method question about indexing.
Why does the substring method in the String class create a new object and return that memory address rather than the information itself or interning it into the String Pool and returning that memory address?
How to correctly use the substring method? (Java)
[JAVA] Best practice to obtain substring using index of a character that may not be in original string.
Specifically this:
substring(int beginIndex, int endIndex)
Given:
String test = "Reddit"
I had thought index 0 to refer to R, 1 to e, 2 to d, etc.
But, turns out, running code:
String new = test.substring(0,0);
System.out.println(new);
Will return a value of: "". Just "".
That's how I found out index 0 did not refer to "R" of String test.
My question is:
What does index 0 refer to when using the substring method?