阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 1-50#41416 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 1-50#41416

年份:104年

科目:OJCP(SCJP)

第10題 Given: 1. import java.util.*; 2. public class Quest{ 3. public static void main(String[] args){ 4. String[] colors = 5. {"blue","red","green","yellow","orange"}; 6. Arrays.sort(colors); 7. int s2 = Arrays.binarySearch(colors, "orange"); 8. int s3 = Arrays.binarySearch(colors, "violet"); 9. System.out.print(s2 + "" + s3); 10. } 11. } What is the result?
(A) 2-1
(B) 2-4
(C) 2-5
(D) 3-1
(E) 3-4 F. 3-5 G. Compilation fails. H. An exception is thrown at runtime.
正確答案:登入後查看

詳解 (共 1 筆)

推薦的詳解#2319850
未解鎖
import java.util.*;p...
(共 671 字,隱藏中)
前往觀看
10
0