单选题
Java
2019-03-04
语句"Hello".equals(" hello");的正确执行结果是( )。
A.true
A.true
B.false
B.false
C.0
C.0
D.1
D.1
参考答案
B
答案解析
equals()方法是比较两个字符串是否相等,其中区分字符串的大小写,因此比较的结果是 Hello 与 hello 两个字符串不相等,答案是 false。
你可能感兴趣的试题
A.4.0,36.0
A.4.0,36.0
B.3.0,40.0
B.3.0,40.0
C.3.0,36.0
C.3.0,36.0
D.4.0,40.0
D.4.0,40.0
A.show one
A.show one
B.show two
B.show two
C.show three
C.show three
D.show four
D.show four


