PRACTICE EXAM 1
The real exam has 60 questions and you are given three hours. It’s the same with this exam.
1. Given:
2. public class Bang extends Thread { 3. static Thread t1, t2, t3; 4. public static void main(String[] args) throws Exception { 5. t1 = new Thread(new Bang()); 6. t2 = new Thread(new Bang()); 7. t3 = new Thread(new Bang()); 8. t1.start(); t2.start(); t3.start(); 9. } 10. public void run() { 11. for(int i = 0; i < 500; i++) { 12. System.out.print(Thread.currentThread().getId() + " "); 13. if(i == 250) 14. try { 15. System.out.print("**" + t1.getId() + "**"); ...
Get OCP Java SE 6 Programmer Practice Exams (Exam 310-065) now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.