问题详情

答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关

publicclassX{publicstaticvoidmain(Stringargs){Strings1=newString(true”);Booleanb1=newBoolean(true);if(s2.equals(b1)){System.out.printIn(Equal”);}}}Whatistheresult?()


publicclassX{publicstaticvoidmain(Stringargs){Strings1=newString(true”);Booleanb1=newBoolean(true);if(s2.equals(b1)){System.out.printIn(Equal”);}}}Whatistheresult?()

A、Theprogramrunsandprintsnothing.

B、Theprogramrunsandprints“Equal”

C、Anerroratline5causescompilationtofail.

D、Theprogramrunsbutabortswithanexception.

参考答案
您可能感兴趣的试题