310-056  Exam

Exam # of questions Description  Update
310-056 129 Sun Certified Programmer for J2SE 5.0 Upgrade Exam... 02/15/2011
[Practice Test]    [Download Study Guide(PDF)]   [Update Exam]

310-056 - Exam Information
  • Description: Sun Certified Programmer for J2SE 5.0 Upgrade Exam
  • Passing Score: 0%
  • Practice Test - Number of questions: 129 questions
  • Simulation Test - Number of questions: 129 questions
  • Simulation Test Duration: 120 minutes
  • Has explanations: No

Question of the day

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

Answer(s)

  1. - Arrays.sort(s);
  2. - s = new TreeSet(s);
  3. - Collections.sort(s);
  4. - s = new SortedSet(s);
Correct Answer

- s = new TreeSet(s);