试题详情
单项选择题 Given the following code fragment:      1) String str = null;  2) if ((str != null) && (str.length() > 10)) {     3) System.out.println("more than 10");     4) }  5) else if ((str != null) & (str.length() < 5)) {     6) System.out.println("less than 5");     7) }  8) else { System.out.println("end"); }   Which line will cause error?()    

A、 line 1

B、 line 2

C、 line 5

D、 line 8

  • C
  • 关注下方微信公众号,在线模考后查看

热门试题