最新最全testpassport scjp 310-055题库

lvhuanhua 2010-03-22 04:40:03
Testpassport scjp 310-055 题库
Testpassport SCJP 310-055题库由资深IT认证讲师和SCJP产品专家结合PROMETRIC或VUE的真实考试环境最新原题倾心打造.,题库覆盖了当前最新的真实考题,并且全部附有正确答案。
不多说,直接上题
认证编号: Sun Certified Programmer for the Java 2 Platform.SE 5.0
考题数量: 240 Q&As
更新: Jan-15-2010
1.Which Man class properly represents the relationship "Man has a best friend who is a Dog"?
A.class Man extends Dog { }
B.class Man implements Dog { }
C.class Man { private BestFriend dog; }
D.class Man { private Dog bestFriend; }
E.class Man { private Dog; }
F.class Man { private BestFriend; }
Answer:D
2.Given: 1. package test; 2. 3. class Target { 4. public String name = "hello"; 5. } What can directly access
and change the value of the variable name?
A.any class
B.only the Target class
C.any class in the test package
D.any class that extends Target
Answer:C
3.Click the Task button.
Answer:
Green choice1---->Yellow Choice1
Green choice2---->Yellow Choice2
Green choice3---->Yellow Choice3
Green choice2---->Yellow Choice5
Green choice5---->Yellow Choice6
Green choice1---->Yellow Choice4
4.Given: 1. class ClassA { 2. public int numberOfInstances; 3. protected ClassA(int numberOfInstances)
{ 4. this.numberOfInstances = numberOfInstances; 5. } 6. } 7. public class ExtendedA extends ClassA { 8.
private ExtendedA(int numberOfInstances) { 9. super(numberOfInstances); 10. } 11. public static void
main(String[] args) { 12. ExtendedA ext = new ExtendedA(420); 13.
System.out.print(ext.numberOfInstances); 14. } 15. } Which statement is true?
A.420 is the output.
The safer , easier way to help you pass any IT exams.
3 / 12
B.An exception is thrown at runtime.
C.All constructors must be declared public.
D.Constructors CANNOT use the private modifier.
E.Constructors CANNOT use the protected modifier.
Answer:A
5.Given: 10. interface Jumper { public void jump(); } ... 20. class Animal {} ... 30. class Dog extends Animal
{ 31. Tail tail; 32. } ... 40. class Beagle extends Dog implements Jumper{ 41. public void jump() {} 42. } ...
50. class Cat implements Jumper{ 51. public void jump() {} 52. } Which three are true? (Choose three.)
A.Cat is-a Animal
B.Cat is-a Jumper
C.Dog is-a Animal
D.Dog is-a Jumper
E.Cat has-a Animal
F.Beagle has-a Tail
G.Beagle has-a Jumper
Answer:B C F
6.Given: 10: public class Hello { 11: String title; 12: int value; 13: public Hello() { 14: title += " World"; 15: }
16: public Hello(int value) { 17: this.value = value; 18: title = "Hello"; 19: Hello(); 20: } 21: } and: 30: Hello c
= new Hello(5); 31: System.out.println(c.title); What is the result?
A.Hello
B.Hello World
C.Compilation fails.
D.Hello World 5
E.The code runs with no output.
F.An exception is thrown at runtime.
Answer:C
7.Given: 10. interface A { public int getValue(); } 11. class B implements A { 12. public int getValue()
{ return 1; } 13. } 14. class C extends B { 15. // insert code here 16. } Which three code fragments, inserted
individually at line 15, make use of polymorphism? (Choose three.)
A.public void add(C c) { c.getValue(); }
B.public void add(B b) { b.getValue(); }
C.public void add(A a) { a.getValue(); }
D.public void add(A a, B b) { a.getValue(); }
E.public void add(C c1, C c2) { c1.getValue(); }
Answer:B C D
需要完整版的请登录www.testpassport.cn 获取
希望对大家有帮助!大家帮我顶起来啊!!!!!!!!!!!!!!!!

...全文
31 1 打赏 收藏 转发到动态 举报
写回复
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dolly_ju 2010-03-22
  • 打赏
  • 举报
回复
路过!!!!!!!

2,075

社区成员

发帖
与我相关
我的任务
社区描述
华为认证、思科认证、项目管理、计算机等级考试、Linux认证、微软认证、H3C认证等IT认证相关的技术交流空间。
社区管理员
  • IT培训
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告