多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

public static void main(String[] args) {  String str = “null‟;  if (str == null) {  System.out.println(”null”);  } else (str.length() == 0) {  System.out.println(”zero”);  } else {  System.out.println(”some”);  }  }  What is the result?()

  • A、 null
  • B、 zero
  • C、 some
  • D、 Compilation fails.
  • E、 An exception is thrown at runtime.
正确答案:D
答案解析:
进入题库查看解析

微信扫一扫手机做题