Question: 4. Consider the following method: public static void mystery(int x) { int y = 0; while (* # 2 -- 0) { x = x/2;
4. Consider the following method: public static void mystery(int x) { int y = 0; while (* # 2 -- 0) { x = x/2; System.out.println(x + + Y): For each of the following calls, indicate the output that the preceding method produces: mystery (19) mystery (42) mystery (48): mystery (40) mystery (64)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
