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
#81. Given:
  1. 11. String test = a1b2c3”;
  2. 12. String[] tokens = test.split(///d”);
  3. 13. for(String s: tokens) System.out.print(s +“ “);
What is the result?

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

#82. Given:
  1. 11. class Converter {
  2. 12. public static void main(String[] args) {
  3. 13. Integer i = args[0];
  4. 14. int j = 12;
  5. 15. System.out.println(”lt is “ + (i==i) + “that j==i.”);
  6. 16. }
  7. 17. }
What is the result when the programmer attempts to compile the code and run it with the command java Converter 12?

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

#83. Given:
  1. 12. importjava.io.*;
  2. 13. public class Forest implements Serializable {
  3. 14. private Tree tree = new Tree();
  4. 15. public static void main(String [] args) {
  5. 16. Forest f = new Forest();
  6. 17 try {
  7. 18. FileOutputStream fs = new FileOutputStream(”Forest.ser);
  8. 20. os.writeObject(f); os.close();
  9. 21. catch (Exception ex) { ex.printStackTrace }
  10. 22. } }
  11. 23.
  12. 24. class Tree { }
What is the result?

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

#84. Given:
  1. int[]myArray= new int[] {1,2,3,4,5};
What allows you to create a list trom this array?

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

#85. Given:
  1. 1. import java.util.*;
  2. 2. public class TestSet {
  3. 3. enum Example { ONE, TWO, THREE }
  4. 4. public static void main(String[] args)
  5. {
  6. 5. Collection coll = new ArrayList();
  7. 6. coll.add(Example.THREE);
  8. 7. coll.add(Example.THREE);
  9. 8. coll.add(Exampie.THREE);
  10. 9. coll.add(Example.TWO);
  11. 10. coll.add(Example.TWO):
  12. 11. coll.add(Example.ONE);
  13. 12. Set set = new HashSet(coll);
  14. 13. }
  15. 14. }
Which statement is true about the set variable on line 12?

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

#86. Given:
  1. 11 . //insert code here
  2. 12. private N min, max;
  3. 13. public N getMin() { return mm; }
  4. 14. public N getMax() { return max; }
  5. 15. public void add(N added) {
  6. 16. if (min == null added.doubleValue() < min.doubleValue())
  7. 17. min = added;
  8. 18. if (max == null II added.doubleValue() > max.doubleValue())
  9. 19. max= added;
  10. 20. }
  11. 21. }
Which two, inserted at line 1 1, will allow the code to compile? (Choose two.)

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

#87. 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. 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. 23. TreeSet set = new TreeSet();
  6. 24. set.add(one);
  7. 25. set.add(two);
A programmer iterates over the TreeSet and prints the name of each Drink object. What is the result?

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

#88. Given a pre-generics implementation of a method:
  1. 11. public static int sum(List list) {
  2. 12. int sum = 0;
  3. 13. for ( Iterator iter = list.iterator(); iter.hasNext(); ) {
  4. 14. int i = ((lnteger)iter.next()).intValue();
  5. 15. sum +=I;
  6. 16. }
  7. 17. return sum;
  8. 18. }
Which three changes must be made to the method sum to use generics? (Choose three.)

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

#89. Given:
  1. 10. public class ClassA {
  2. 11. public void count(int i) {
  3. 12. count(++i);
  4. 13. }
  5. 14. }
And:
  1. 20. ClassA a = new ClassA();
  2. 21. a.count(3);
Which exception or error should be thrown by the virtual machine?

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

#90. Given:
  1. 11. static class A {
  2. 12. void process() throws Exception {throw new Exception(); }
  3. 13. }
  4. 14. static class B extends A {
  5. 15. void process() { System.out.println(”B “); }
  6. 16. }
  7. 17. public static void main(String[] args) {
  8. 18. A a = new B ();
  9. 19. a.process();
  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.298 Server date 06:07 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump