Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What common english word will make this program print out \"eroo\" public static

ID: 3769163 • Letter: W

Question

What common english word will make this program print out "eroo"

public static void main(String[] args) {

       Scanner keyboard = new Scanner(System.in);

       String input = keyboard.next();

       if (input.charAt(0) == 's' && input.length() == 6)

       {

           if (input.contains("ch") && (!input.contains("a") || !input.contains("e") || !input.contains("u")) && input.contains("w"))

           {

               if(input.substring(2, 4).equals("it") && !input.substring(1, 2).equals("n"))

                       {

                           System.out.print("eroo");

                       }

           }

       }

}

Explanation / Answer

switch

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote