试题详情
- 单项选择题 public class ClassA{ public int getValue(){ int value=0; boolean setting=true; String title="Hello"; if(value||(setting && title=="Hello")){return 1;} if(value==1&title.equals("Hello")){return 2;} } } And: ClassA a=new ClassA(); a.getValue(); What is the result?()
A、1
B、2
C、Compilation fails.
D、The code runs with no output.
E、An exception is thrown at runtime.
- C
关注下方微信公众号,在线模考后查看
热门试题
- Which are̳
- 请问下列代码的输出结果有可能是哪些()。
- 下列哪些访问修饰符是在子类中可见的?()
- class super&en
- 以下程序执行的结果是什么?()&ens
- 已知: 的输出为()
- 将单选框放到面板中时,以下注意事项中哪条
- 下面描述属于java虚拟机功能的是()。
- class super&en
- 下面程序的运行结果:()。
- 编写Applet程序,包含三个标签,其背
- public class&e
- 怎样使用匿名类的对象?
- 现有: int
- You are b
- 输入两个正整数m和n,输出其最大公约数和
- 已知: 则下面表达式在横线处值为tru
- 有关hashMap跟hashTable的
- 用迭代法编写程序用于求解立方根。
- public class&e