preview

Java Dumps

Satisfactory Essays
Open Document

310-065 Sun Certified Programmer for the Java 2 Platform.SE 6.0 Exam: 310-065 Edition: 3.0 © 2008 - 2009 Test Killer, LTD All Rights Reserved 1 http://www.testkiller.com http://www.troytec.com 310-065 QUESTION: 1 Given: 1. public class Threads2 implements Runnable { 2. 3. public void run() { 4. System.out.println("run."); 5. throw new RuntimeException("Problem"); 6. } 7. public static void main(String[] args) { 8. Thread t = new Thread(new Threads2()); 9. t.start(); 10. System.out.println("End of method."); 11. } 12. } Which two can be results? (Choose two.) A. java.lang.RuntimeException: Problem B. run. java.lang.RuntimeException: Problem C. End of method. java.lang.RuntimeException: Problem D. End of method. run. …show more content…

public abstract class Circle extends Shape { private int radius; } C. public class Circle extends Shape { private int radius; public void draw(); } D. public abstract class Circle implements Shape { private int radius; public void draw(); } E. public class Circle extends Shape { private int radius; 5 http://www.testkiller.com http://www.troytec.com 310-065 public void draw() {/* code here */} F. public abstract class Circle implements Shape { private int radius; public void draw() { /* code here */ } Answer: B,E QUESTION: 8 Given: 11. public class Barn { 12. public static void main(String[] args) { 13. new Barn().go("hi", 1); 14. new Barn().go("hi", "world", 2); 15. } 16. public void go(String... y, int x) { 17. System.out.print(y[y.length - 1] + " "); 18. } 19. } What is the result? A. hi hi B. hi world C. world world D. Compilation fails. E. An exception is thrown at runtime. Answer: D QUESTION: 9 Given: 10. class Nav{ 11. public enum Direction { NORTH, SOUTH, EAST, WEST } 12. } 13. public class Sprite{ 14. // insert code here 15. } Which code, inserted at line 14, allows the Sprite class to compile? A. Direction d = NORTH; B. Nav.Direction d = NORTH; C. Direction d = Direction.NORTH; D. Nav.Direction d = Nav.Direction.NORTH; 6 http://www.testkiller.com http://www.troytec.com 310-065 Answer: D QUESTION: 10 Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit? A.

Get Access