Consider the following code segment.
String str = "abcdef";
for (int rep = 0; rep < str.length() - 1; rep++)
{
System.out.print(str.substring(rep, rep + 2));
}
A) abcdef
B) aabbccddeeff
C) abbccddeef
D) abcbcdcdedef
E) Nothing is printed because an IndexOutOfBoundsException is thrown.