Question: Consider the following method. public int someCode(int a, int b, int c) { If ((a =b)&8(b>=c)) return b; if ((a==b)(a=c)(b=c)) return c; ) Which of
Consider the following method. public int someCode(int a, int b, int c) \{ If ((a=b)&8(b>=c)) return b; if ((a==b)(a=c)(b=c)) return c; ) Which of the following best describes why this method does not compile? (A) The reserved word return cannot be used in the body of an if statement: (B) It is possible to reach the end of the method without returning a value. (C) The if statements must have else parts when they contain return statements. (D) Methods cannot have multiple return statements. (IS) The third if statement is not reachable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
