Assuming that the user provides 49 as input, what is the out…

Assuming that the user provides 49 as input, what is the output of the following code snippet? int x = 0; int y = 0; System.out.print(“Please enter y: “); Scanner in = new Scanner(System.in); y = in.nextInt(); if (y > 50); { x = y; } System.out.println(“x: ” + x);

Suppose you want to write an if statement with multiple alte…

Suppose you want to write an if statement with multiple alternatives to print out someone’s tax bracket based on their income. Assume the integer variable income holds the annual income. What is wrong with the following if statement? if (income < 10000) { System.out.println("Lowest tax bracket"); } if (income < 20000) { System.out.println("Low-Middle tax bracket"); } if (income < 30000) { System.out.println("Middle tax bracket"); } System.out.println("High tax bracket");