试题详情
- 单项选择题 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.
- A
关注下方微信公众号,在线模考后查看
热门试题
- Which willQ
- 1. class
- 求1000以内的“相亲数”。所谓相亲数是
- 现有包结构: com&en
- Given: 10.public&en
- 两个乒乓球队进行比赛,各出三人。甲队为a
- A developer&en
- public class&e
- public class&e
- Which three
- Which interfac
- 有n个整数,使其前面各数顺序向后移m个位
- Given the̳
- Which is t
- A developer&en
- CLASSPATH是有关什么的环境变量?
- class java&ens
- public static&
- public class&e
- 1. interface&e