Below is my code. I have tried to use numbers as cases instead of letters and it worked. however i would like to use letters instead. this is where i get issues. Please help me . Thanks
public class Hello {
    public static void main(String[] args) throws IOException {
        String input = "input";
        Scanner scanner = new Scanner(System.in);
        switch (scanner.next()) {
        case "f" :
        case "F" :
        case "Forward" :
        case "forward" :
            while (input == "f");
            System.out.println("You Have Chosen Forward");
            System.out.println("Enter a speed and duration");
            else
                System.out.println("the values you have written are out of range");
            break;
    case "b" :
        case "B" :`enter code here`
        case "Backward" :
        case "backward" :
            while (input == "b");
            System.out.println("You Have Chosen backward");
            System.out.println("Enter a speed and duration");
            else
                System.out.println("the values you have written are out of range");
            break;
        case "Q":
            System.out.println("Goodbye!");
            System.exit(0);
        }
}
}