별의 공부 블로그 🧑🏻‍💻

🗒️ 2017/08/05 (5)

728x90
  1. 2017.08.05 [1Z0-851A] Question 51~60

    QUESTION 51 Given: 23. Object [] myObjects = { 24. new Integer(12), 25. new String("foo"), 26. new Integer(5), 27. new Boolean(true) 28. }; 29. Arrays.sort(myObjects); 30. for(int i=0; i

  2. 2017.08.05 [1Z0-851A] Question 41~50

    QUESTION 41 Given: 33. try { 34. //some code here 35. } catch (NullPointerException e1) { 36. System.out.print("a"); 37. } catch (Exception e2) { 38. System.out.print("b"); 39. } finally { 40. System.out.print("c"); 41. } If some sort of exception is thrown at line 34, which output is possible? A. a B. b C. c D. ac E. abc Correct Answer: D Section: All Explanation Explanation/Reference: QUESTION..

  3. 2017.08.05 [1Z0-851A] Question 31~40

    QUESTION 31 Given: public class Score implements Comparable { private int wins, losses; public Score(int w, int l) { wins = w; losses = l; } public int getWins() { return wins; } public int getLosses() { return losses; } public String toString() { return ""; } // insert code here } Which method will complete this class? A. public int compareTo(Object o){/*more code here*/} B. public int compareT..

  4. 2017.08.05 [1Z0-851A] Question 21~30

    QUESTION 21 Given: 5. class Building { } 6. public class Barn extends Building { 7. public static void main(String[] args) { 8. Building build1 = new Building(); 9. Barn barn1 = new Barn(); 10. Barn barn2 = (Barn) build1; 11. Object obj1 = (Object) build1; 12. String str1 = (String) build1; 13. Building build2 = (Building) barn1; 14. } 15. } Which is true? A. If line 10 is removed, the compilati..

  5. 2017.08.05 [1Z0-851A] Question 11~20

    QUESTION 11 Given: 1. public class Rainbow { 2. public enum MyColor { 03. RED(0xff0000), GREEN(0x00ff00), BLUE(0x0000ff); 4. private final int rgb; 5. MyColor(int rgb) { this.rgb = rgb; } 6. public int getRGB() { return rgb; } 07. }; 8. public static void main(String[] args) { 9. //insert code here 10. } 11. } Which code fragment, inserted at line 9, allows the Rainbow class to compile? A. MyCol..

728x90


📖 Contents 📖