public static void test(int x)
int odd = 1;
Assuming that the main() method is defined in the same class as test() and it calls test(), which statement is/are true?
The test() method fails to compile
The test() method prints "odd"
The test() method prints "even"
"odd" will be printed for odd values of x, and "even" for even values of x
Back To Top