310-065Big5 SCJP Braindump
ExamSoon 310-065Big5 Exams
SUN Sun Certified Programmer for the Java 2 Platform. SE6.0
O rder : 310-065Big5 Exam
Practice Exam: 310-065Big5
Exam Number/Code: 310-065Big5
Exam Name: Sun Certified Programmer for the Java 2 Platform. SE6.0
Questions and Answers: 270 Q&As
Free 310-065Big5 Braindumps
Exam : SUN 310-065Big5
Title : Sun Certified Programmer for the Java 2 Platform, SE 6.0
1. }
16. }
結果為何?
A. B
B. B,後面是 Exception。
C. 編譯會失敗,因為第 9 行有錯誤。
D. 編譯會失敗,因為第 14 行有錯誤。
E. 丟出 Exception,沒有其他輸出。
Answer: D
2. }
7. }
將以下哪兩個程式碼片段個別插入第 3 行後,會輸出 4247?(請選擇兩個答案。)
A. String s = "123456789";
s = (s-"123").replace(1,3,"24") - "89";
B. StringBuffer s = new StringBuffer("123456789");
s.delete(0,3).replace(1,3,"24").delete(4,6);
C. StringBuffer s = new StringBuffer("123456789");
s.substring(3,6).delete(1,3).insert(1, "24");
D. StringBuilder s = new StringBuilder("123456789");
s.substring(3,6).delete(1,2).insert(1, "24");
E. StringBuilder s = new StringBuilder("123456789");
s.delete(0,3).delete(1,3).delete(2,5).insert(1, "24");
Answer: BE
3. }
請問要在第 15 行插入哪個程式碼,才能讓 Sprite 類別進行編譯?
A. Foo { public int bar() { return 1; } }
B. new Foo { public int bar() { return 1; } }
C. new Foo() { public int bar() { return 1; } }
D. new class Foo { public int bar() { return 1; } }
Answer: C
4. 已知:
5. class A {
6. void foo() throws Exception { throw new Exception(); }
7. }
8. class SubB2 extends A {
9. void foo() { System.out.println("B "); }
10. }
11. class Tester {
12. public static void main(String[] args) {
13. A a = new SubB2();
14. a.foo();
15. }
16. }
結果為何?
A. B
B. B,後面是 Exception。
C. 編譯會失敗,因為第 9 行有錯誤。
D. 編譯會失敗,因為第 14 行有錯誤。
E. 丟出 Exception,沒有其他輸出。
Answer: D
5. 已知:
11. public static Iterator reverse(List list) {
12. Collections.reverse(list);
13. return list.iterator();
14. }
15. public static void main(String[] args) {
16. List list = new ArrayList();
17. list.add("1"); list.add("2"); list.add("3");
18. for (Object obj: reverse(list))
19. System.out.print(obj + ", ");
20. }
結果為何?
A. 3,