欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

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

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题