Suppose we are given:
Scanner stdin = new Scanner(System.in); System.out.print("Go again? "); String answer = stdin.nextLine(); boolean goAgain;
What code can be added so that goAgain is set to true if the user enters "yes" (using any combination of upper- and lower-case letters) and false otherwise.
Try to come up with
Additional challenge:
Modify your solution to handle a user who inputs other versions of yes such as