11. public static void test(String str) { 12. if(str == null | str.lellgth() == 0) { 13. System.out.println(”String is empty”); 14. } else { 15. System.out.println(”String is not empty”); 16. } 17. } And the invocation: 31. test(llull); What is the result?()
- A、 Au exception is thrown at runtime.
- B、 “String is empty” is printed to output.
- C、 Compilation fails because of au error in line 12.
- D、 “String is not empty” is printed to output.
正确答案:A
答案解析:有
微信扫一扫手机做题