English Русский Contacts Site map Add to favorites
Registration
Login
Master braindump list
New braindumps
Submit a dump
Get latest dump
braindumps.com.ua
flame
3COM (7)
Adobe (1)
BEA (1)
Checkpoint (22)
Cisco (20)
Citrix (21)
CIW (15)
Compaq (0)
CompTIA (51)
CWNA (2)
EMC (2)
Exin (4)
GEJOS (4)
HDI (1)
HP (4)
IBM (13)
Juniper (5)
Linux Prof Institute (LPI) (2)
Lotus (11)
Microsoft (2462)
Network Appliance (2)
Novell (16)
Oracle (423)
PLSQL (1)
PMI (5)
SAS (1)
Sun (87)
Teradata (4)
Login:
Password:
RSS feed

Contacts
Certification links
Links
Authorized user can see question and answers.
Please log in or sign up.

Exam question list:
Show all comments
Sun 310-056: Sun Certified Programmer for J2SE 5.0 Upgrade Exam
#101. Given:
  1. 1. public class Base {
  2. 2. public static final String FOO = “foo”;
  3. 3. public static void main(String[] args) {
  4. 4. Base b = new Base();
  5. 5. Sub s = new Sub();
  6. 6. System.out.print(Base.FOO);
  7. 7. System.out.print(Sub.FOO);
  8. 8. Systemout.print(b.FOO);
  9. 9. System.out.print(s.FOO);
  10. 10. System.out.print(((Base)s).FOO);
  11. 11. } }
  12. 12. class Sub extends Base {public static final String FOO=”bar”;}

What is the result?

Show comments for this question (0)
Add comments
Link to this question

#102. Given:
  1. 1. package geometry;
  2. 2. public class Hypotenuse {
  3. 3. public lnnerTriangle it = new lnnerTriangle();
  4. 4. class lnnerTriangle {
  5. 5. public mt base;
  6. 6. public mt height
Which statement is true about the class of an object that can reference the variable base?

Show comments for this question (0)
Add comments
Link to this question

#103. Which three statements are true? (Choose three.)

Show comments for this question (0)
Add comments
Link to this question

#104. Given:
  1. 11. class ClassA {}
  2. 12. class ClassB extends ClassA (}
  3. 13. class ClassC extends ClassA {)
and:
  1. 21. ClassA p0 = new ClassA();
  2. 22. ClassB p1 = new ClassB();
  3. 23. ClassC p2 = new ClassC();
  4. 24. ClassA p3 = new ClassB();
  5. 25. ClassA p4 = new ClassC();
Which three are valid? (Choose three.)

Show comments for this question (0)
Add comments
Link to this question

#105. Given:
  1. 10: public class Hello {
  2. 11: String title;
  3. 12: int value;
  4. 13: public Hello() {
  5. 14: title += “ World”;
  6. 15: }
  7. 16: public Hello(int value) {
  8. 17: this.value = value;
  9. 18: title = “Hello”;
  10. 19: Hello();
  11. 20: }
  12. 21: }
and:
  1. 30: Hello c = new Hello(5);
  2. 31: System .out.println(c.title);
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#106. Given:
  1. 1. public class Target {
  2. 2. private int i = 0;
  3. 3. public int addOne(){
  4. 4. return ++i;
  5. 5 . }
  6. 6. }
And:
  1. 1. public class Client {
  2. 2. public static void main(String[] args){
  3. 3. System.out.println(new Target().addone());
  4. 4. }
  5. 5. }
Which change can you make to Target without affecting Client?

Show comments for this question (0)
Add comments
Link to this question

#107. Given:
  1. 11. class Animal
  2. { public String noise() { return “peep”; } }
  3. 12. class Dog extends Animal {
  4. 13. public String noise() { return “bark”; }
  5. 14. }
  6. 15. class Cat extends Animal {
  7. 16. public String noise() { return “meow”; }
  8. 17. }
  9. 30. Animal animal = new Dog();
  10. 31. Cat cat = (Cat)animal;
  11. 32. System.out.println(cat.noise());
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#108. Given:
  1. 11. public class Bootchy {
  2. 12. int bootch;
  3. 13. String snootch;
  4. 14.
  5. 15. public Bootchy() {
  6. 16. this(”snootchy”);
  7. 17. System.out.print(“first “);
  8. 18. }
  9. 19.
  10. 20. public Bootchy(String snootch) {
  11. 21. this(420, “snootchy”);
  12. 22. System.out.print(”second “);
  13. 23. }
  14. 24.
  15. 25. public Bootchy(int botch, String snootch) {
  16. 26. this.bootch = bootch;
  17. 27. this.snootch = snootch;
  18. 28. System.out .print(”third “);
  19. 29. }
  20. 30.
  21. 31. public static void raain(String[] args)
  22. {
  23. 32. Bootchy b = new Bootchy();
  24. 33. System.out.print(b.snootch + “ “ +b.bootch);
  25. 34. }
  26. 35. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#109. A programmer needs to create a logging method that can accept an arbitrary number of arguments. For example, it may be called in these ways:
loglt(”Iog message1 “);
loglt(”Iog message2”,log message3”);
Ioglt(”log message4”,”log message5”,”log message6”);
Which declaration satisfies this requirement?

Show comments for this question (0)
Add comments
Link to this question

#110. Given:
  1. 1. interlace TestA { String toString(); }
  2. 2. public class Test {
  3. 3. public static void main(String[] args) {
  4. 4. System.out.println(new TestA() {
  5. 5. public String toString() { return “test”; }
  6. 6. });
  7. 7. }
  8. 8. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question


  [1] ...  [11] [12]
Up ^ gen. 0.294 Server date 06:05 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump