Link to home
Start Free TrialLog in
Avatar of lostinspace9
lostinspace9

asked on

Recursive Helper Method - no output

public class Sheldon {
public static void main(String[] args) {
     
           reverseDisplay("123456");
}
    public static void reverseDisplay(String value){
        reverseDisplay(value, value.length() -1);
        }
    public static void reverseDisplay(String value, int high){
        if (high < 0){
            System.out.print(value.charAt(value.length()-1));
            reverseDisplay(value.substring(0, value.length()-1));
    }
    }

}

Open in new window


This builds with no problem but there is no output. I would expect to see 654321 on the console.
ASKER CERTIFIED SOLUTION
Avatar of lostinspace9
lostinspace9

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial