第9題 Given: 11. String[] elements = {"for", "tea", "too"}; 12. String first = (elements.length>0) ? elements[0] : null; What is the result?
(A) Compilation fails.
(B) An exception is thrown at runtime.
(C) The variable first is set to null.
(D) The variable first is set to elements[0]

答案:登入後查看
統計: A(50), B(34), C(24), D(190), E(0) #1157014

詳解 (共 2 筆)

#2181547
Given:11.    String[...
(共 385 字,隱藏中)
前往觀看
10
0
#2319654
三元運算子(條件式) ? "符合條件的答...
(共 205 字,隱藏中)
前往觀看
2
0