Multiple Choice
public int mystery(int x, int y)
{
If (x >= y)
Return x - y;
Else
Return x + y;
}Based on the code in the accompanying figure, what would be the output of the following statement?System.out.println(mystery(8,7) ) ;
A) 1
B) 7
C) 8
D) 15
Correct Answer:

Verified
Correct Answer:
Verified
Q11: The class Math is contained in the
Q14: The signature of a method consists of
Q17: public static double secret(int first, double second)<br>{<br>Double
Q18: public static char methodHeading(int n, double num)Which
Q22: public static char methodHeading(int n, double num)Based
Q23: Formal parameters of primitive data types provide
Q24: int larger(int x, int y)Given the method
Q25: To use a predefined method, you must
Q25: public static double secret(int first, double second)<br>{<br>Double
Q49: In order to use the method isUpperCase