Question: Rewrite the if logic in the code below as one nested if statement. int x = scan.nextInt(); int y; if (x == 10) y

Rewrite the if logic in the code below as one nested if statement. int x = scan.nextInt(); int y; if (x == 10) y = 5; if (x == 20) y = 6; if (x!= 10 && x != 20) y = 7;
Step by Step Solution
There are 3 Steps involved in it
Heres the nested if ... View full answer
Get step-by-step solutions from verified subject matter experts
