killtestは最新の問題集を提供いたします!
上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

SUN SCJP 310-066
試験番号: 310-066

試験の名称: Upgrade EXAM for the Sun Certified for Java Programmer.SE6.0

バージョン:V8.02
問題と解答:93 Q&As
価格(日本円): \ 8900.00 JPY
更新:2010-06-28

1. Given:
11. public class Test {
12. public enum Dogs {collie, harrier, shepherd};
13. public static void main(String [] args) {
14. Dogs myDog = Dogs.shepherd;
15. switch (myDog) {
16. case collie:
17. System.out.print("collie ");
18. case default:
19. System.out.print("retriever ");
20. case harrier:
21. System.out.print("harrier ");
22. }
23. }
24. }
What is the result?
A.harrier
B.shepherd
C.retriever
D.Compilation fails.
E.retriever harrier
F.An exception is thrown at runtime.
Answer:D
2. Given:
10. interface Foo {}
11. class Alpha implements Foo {}
12. class Beta extends Alpha {}
13. class Delta extends Beta {
14. public static void main( String[] args ) {
15. Beta x = new Beta();
16. // insert code here
17. }
18. }
Which code, inserted at line 16, will cause a java.lang.ClassCastException?
A.Alpha a = x;
B.Foo f = (Delta)x;
C.Foo f = (Alpha)x;
D.Beta b = (Beta)(Alpha)x;
Answer:B
3. A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where
the old one is installed. Bob is currently able to run a Java chess program starting from his home directory
/home/bob using the command:
java -classpath /test:/home/bob/downloads/*.jar games.Chess
Bob's CLASSPATH is set (at login time) to:/usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jarWhat is
a possible location for the Chess.class file?
A./test/Chess.class
B./home/bob/Chess.class
C./test/games/Chess.class
D./usr/lib/games/Chess.class
E./home/bob/games/Chess.class
F.inside jarfile /opt/java/lib/Games.jar (with a correct manifest)
G.inside jarfile /home/bob/downloads/Games.jar (with a correct manifest)
Answer:C
4.Given:
21. class Money {
22. private String country = "Canada";
23. public String getC() { return country; }
24. }
25. class Yen extends Money {
26. public String getC() { return super.country; }
27. }
28. public class Euro extends Money {
29. public String getC(int x) { return super.getC(); }
30. public static void main(String[] args) {
31. System.out.print(new Yen().getC()+ " " + new Euro().getC());
32. }
33. }
What is the result?
A.Canada
B.null Canada
C.Canada null
D.Canada Canada
E.Compilation fails due to an error on line 26.
F.Compilation fails due to an error on line 29.
Answer:E
5.Given:
3. import java.util.*;
4. public class Hancock {
5. // insert code here
6. list.add("foo");
7. }
8. }
Which two code fragments, inserted independently at line 5, will compile without warnings? (Choose two.)
A.public void addStrings(List list) {B.public void addStrings(List list) {C.public void addStrings(List list)
{D.public void addStrings(List list) {
Answer: BC
スポンサーサイト

【2010/07/08 12:56】 | 資格
トラックバック(0) |
コメント
この記事へのコメント
コメントを投稿
URL:

Pass:
秘密: 管理者にだけ表示を許可
 
トラックバック
この記事のトラックバックURL
この記事へのトラックバック
上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。