未知题型
下列程序的执行结果是______。 public class Test9 { public static void main(String[] args) { String s1 = new String('I am a girl'); String s2 = new String('I am a girl'); System.out.println (s1.equal (s2)); } }
A.true
B.假
C.I amgirl
D.都不正确
- A.out.println
B.equal
C.true
B.假
C.I
【参考答案】
A
解析:如果需要比较两个对象的值是否相同,则可以调用equal()方法,如果被比较的两个对象相等,则返回tru......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
相关考题
-
单项选择题
下列各项中属于反映财务状况的会计要素是 A. 费用 B. 固定资产 C. 负债 D. 收入 -
未知题型
Which of the following italicized phrase is INCORRECT?A.The city is now ten times its original sizE.B.I wish I had two times his strength.C.The seller asked for double the usual pricE.D.They come here four times every year.
A.The
B.
B.I
C.
C.The
D.
D.They -
单项选择题
如果一份肯德鸡的边际效用为3,一件金利来衬衫的边际效用为20,当二者的价格分别为15元和150元时,消费者的消费行为应该是( )。 A. 增加衬衫或减少肯德鸡的消费 B. 增加肯德鸡或减少衬衫的消费 C. 同时增加或减少二者的消费 D. 对二者的消费量不变
