Question: Factor out redundant code from the following example by moving it out of the if/else statement, preserving the same output. if (x < 30) {
Factor out redundant code from the following example by moving it out of the if/else statement, preserving the same output.

if (x < 30) { a = 2; x++; System.out.println ("Java is awesome! + x); } else { a = 2; System.out.println ("Java is awesome! + x);
Step by Step Solution
3.37 Rating (184 Votes )
There are 3 Steps involved in it
Refactored code t... View full answer
Get step-by-step solutions from verified subject matter experts
