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
#21. Given:
  1. 10. public class Bar {
  2. 11. static void foo( int...x ) {
  3. 12. // insert code here
  4. 13. }
  5. 14. }
Which two code fragments, inserted independently at line 12, will allow the class to compile? (Choose two.)

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

#22. Given:
  1. 55. int[] x = {1,2,3,4,5};
  2. 56. int y[] = x;
  3. 57. System.out.println(y[2]);
Which statement is true?

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

#23. Given:
  1. 1. import java.util.*;
  2. 2. public class Example {
  3. 3. public static void main(String[] args) {
  4. 4. //insert code here
  5. 5. set.add(new lnteger(2));
  6. 6. set.add(new lnteger(1));
  7. 7. System.out.println(set);
  8. 8. }
  9. 9. }
Which code, inserted at line 4, guarantees that this program will output [1, 2]?

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

#24. Given:
  1. 1. public class Drink implements Comparable {
  2. 2. public String name;
  3. 3. public int compareTo(Object o) {
  4. 4. return 0;
  5. 5. }
  6. }
and
  1. 20. Drink one = new Drink();
  2. 21. Drink two = new Drink();
  3. 22. one.name = “Coffee”;
  4. 23. two .name = “Tea”;
  5. 24. TreeSet set = new Treeset();
  6. 25. set.add(one);
  7. 26. set.add(two);
A programmer iterates over the TreeSet and prints the name or each Drink object. What is the result?

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

#25. A programmer must create a generic class MinMax and the type parameter of MinMax must implement Comparable.
Which implementation of MinMax will compile?

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

#26. Given:
  1. 34. HashMap props = new HashMap();
  2. 35. props.put(”key45”, “some value”);
  3. 36. props.put(”key12”, “some other value”);
  4. 37. props.put(”key39”, “yet another value”);
  5. 38. Set s = props.keySet();
  6. 39. // insert code here
What, inserted at line 39, will sort the keys in the props HashMap?

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

#27. Given:
  1. 11. public static Collection get() {
  2. 12. Collection sorted = new LinkedList();
  3. 13. sorted.add(”B”); sorted.add(”C”); sorted.add(”A”);
  4. 14. return sorted;
  5. 15. }
  6. 16. public static void main(String] args) {
  7. 17. for(Object obj: gets()) {
  8. 18. System.out.print(obj + “ , “);
  9. 19. }
  10. 20. }
What is the result?

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

#28. Given:
  1. 12. public class Test {
  2. 13. public enum Dogs {collie, harrier};
  3. 14. public static void main(String [] args) {
  4. 15. Dogs myDog = Dogs.collie;
  5. 16. switch (myDog) {
  6. 17. case collie:
  7. 18. System.out.print(”collie “);
  8. 19. case harrier
  9. 20. System.out.print(”harrier “);
  10. 21. }
  11. 22. }
  12. 23.}
What is the result?

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

#29. Given:
  1. 10. interface Foo {}
  2. 11. class Alpha implements Foo {}
  3. 12. class Beta extends Alpha {}
  4. 13. class Delta extends Beta {
  5. 14. public static void main( String[] args ) {
  6. 15. Beta x = new Beta();
  7. 16. // insert code here
  8. 17. }
  9. 18. }
Which code, inserted at line 16, will cause ajava.lang.ClassCastException?

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

#30. Given:
  1. 11. Float pi = new Float(3.14f);
  2. 12. if(pi > 3) {
  3. 13. System.out.print(”pi is bigger than 3.”);
  4. 14. }
  5. 15. else {
  6. 16. System.out.print(”pi is not bigger than 3. “);
  7. 17. }
  8. 18. finally {
  9. 19. System.out.println(”Have a nice day.”);
  10. 20. }
What is the result?

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


 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] ... [12 
Up ^ gen. 0.269 Server date 06:24 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump