Question: (5 pts) Rewrite the foo() method in the space on the right so that its functionality does not change but it does not use any

(5 pts) Rewrite the foo() method in the space on the right so that its functionality does not change but it does not use any conditional statements (no "if" or "if/else" statements, ternary expressions, while statements, etc.). Partial credit may be given if you do it with just one conditional statement. public boolean foo (boolean p, boolean 9, int i) public boolean foo (boolean p, boolean 9, int i) if (i == 42) { if (p == q) { return true; return false; } else { return true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
