Substring using recursion in java. If cur becomes empty, skip the current chara...