별의 공부 블로그 🧑🏻‍💻

🗒️ 2017/08/11 (6)

728x90
  1. 2017.08.11 [1Z0-851B] Question 51~60

    QUESTION 51 Given: public static Collection get() { Collection sorted = new LinkedList(); sorted.add("B"); sorted.add("C"); sorted.add("A"); return sorted; } public static void main(String[] args) { for (Object obj: get()) { System.out.print(obj + ", "); } } What is the result? A. A, B, C, B. B, C, A, C. Compilation fails. D. The code runs with no output. E. An exception is thrown at runtime. Co..

  2. 2017.08.11 [1Z0-851B] Question 41~50

    QUESTION 41 Given: class Snoochy { Boochy booch; public Snoochy() { booch = new Boochy(this); } } class Boochy { Snoochy snooch; public Boochy(Snoochy s) { snooch = s; } } And the statements: 21. public static void main(String[] args) { 22. Snoochy snoog = new Snoochy(); 23. snoog = null; 24. // more code here 25. } Which statement is true about the objects referenced by snoog, snooch, and booch..

  3. 2017.08.11 [1Z0-851B] Question 31~40

    QUESTION 31 Click the Exhibit button. Given the fully-qualified class names: com.foo.bar.Dog com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JVM? Exhibit: A. Jar A B. Jar B C. Jar C D. Jar D E. Jar E Correct Answer: A Section: All Explanation Explanation/Reference: ..

  4. 2017.08.11 [1Z0-851B] Question 21~30

    QUESTION 21 Given: 1. public class TestFive { 2. private int x; 3. 4. public void foo() { 5. int current = x; 6. x = current + 1; 7. } 8. 9. public void go() { 10. for(int i = 0; i < 5; i++) { 11. new Thread() { 12. public void run() { 13. foo(); 14. System.out.print(x + ", "); 15. } 16. }.start(); 17. } 18. } 19. } Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ? ..

  5. 2017.08.11 [1Z0-851B] Question 11~20

    QUESTION 11 Given: 3. import java.util.*; 4. public class G1 { 5. public void takeList(List

  6. 2017.08.11 [1Z0-851B] Question 01~10

    QUESTION 1 Given: 1. interface Animal { void makeNoise(); } 2. class Horse implements Animal { 3. Long weight = 1200L; 4. public void makeNoise() { System.out.println("whinny"); } 05. } 06. 7. public class Icelandic extends Horse { 8. public void makeNoise() { System.out.println("vinny"); } 9. public static void main(String[] args) { 10. Icelandic i1 = new Icelandic(); 11. Icelandic i2 = new Ice..

728x90


📖 Contents 📖