I just finished doing our PracticeIt assignment and I was stumped on the printReverse question.
After initializing phraseLength to word.length(), I put in a for loop initializing my loop control variable i to phraseLength and counted down to 0.
I continued to get an error:
threw StringIndexOutOfBoundsException:
String index out of range: 12
CodeStepByStepJavaTestHarness.printReverse(CodeStepByStepJavaTestHarness.java:4)
I don't quite understand why this doesn't work. I figured out what code works, but I just cannot figure out why this code is ending in error.
Any help is appreciated!