public void test(int x) {  int odd = x%2;  if (odd) {   System.out.println(“odd);  } else {  System.out.println(“even”);  }  }  Which statement is true?() 

A . Compilation fails. B .  “odd” will always be output. C .  “even” will always be output. D .  “odd” will be output for odd values of x, and “even” for even values. E .  “even” will be output for add values of x, and “odd” for even values.

时间:2022-10-23 05:44:41 所属题库:SCJP程序员认证考试题库

相似题目