Question: 2. What will be printed by the code below for each of the following assignments of values to x,y and z? Assume MAX is a

2. What will be printed by the code below for each of the following assignments of values to x,y and z? Assume MAX is a constant with a value of 100; a) int x = 10, y = 80, z = 40; b) int x = 70, y = 150, z = 70; c) int x = 170, y = 30, z = 10; if (y x - y) System.out.println(""); else { System.out.println("D"); System.out.println("E"); } } else if (y + 2 == MAX) System.out.println ("F"); else System.out.println ("G"); System.out.println ("H")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
