I have this problem for homework (I\'m being honest, not trying to hide it at least) And I\'m having problems figuring out how to do it.
Given the following declarat
The i++ increments i after is has been used, so you're essentially saying string.substring(i,i). Since the ending mark is exclusive, this will always return an empty string. An easy fix would be to just change it to
j = phrase.substring(i, ++i);
Hope that helps!