310-036 SCJP Braindump
ExamSoon 310-036 Exams
SUN SUN CERTIFIED JAVA 2 PROGRAMMER 1.4 UPGRADE
O rder : 310-036 Exam
Practice Exam: 310-036
Exam Number/Code: 310-036
Exam Name: SUN CERTIFIED JAVA 2 PROGRAMMER 1.4 UPGRADE
Questions and Answers: 66 Q&As
Free 310-036 Braindumps
Exam : SUN 310-036
Title : SUN CERTIFIED JAVA 2 PROGRAMMER 1.4 UPGRADE
1. Which statement is true?
A. To call the join() method, a thread must own the lock of the current thread.
B. To call the sleep() method, a thread must own the lock of the current thread.
C. To call the yield() method, a thread must own the lock of the current thread.
D. To call the notify() method, a thread must own the lock of the current thread.
E. To call the notify() method, a thread must own the lock of the object on which the call is to be made.
Answer: E
2. Given:
11. public static void main( String[] args ) {
12. Integer a = new Integer(10);
13. Integer b = new Integer(10);
14. Integer c = a;
15. int d = 10;
16. double e = 10.0;
17. }
Which three evaluate to true? (Choose three.)
A. (a == c)
B. (d == e)
C. (b == d)
D. (a == b)
E. (b == c)
F. (d == 10.0)
Answer: ABF
3. Click the Exhibit button.
Thread theThread has just executed line 8 and is in the wait state.
Which statement, if inserted at line 19, causes theThread to leave the wait state and execute line 9?
A. theThing.notify();
B. theThread.notify();
C. theThread.interrupt();
D. synchronized(theThing) { theThing.notify(); }
E. synchronized(theThread) { theThread.notify(); }
Answer: D
4. What happens when thread X executes a wait() method on object A, without owning object A's lock?
A. Compilation fails.
B. An exception is thrown.
C. The wait() method has no effect.
D. Thread X receives the lock immediately.
E. Object A moves the thread to the wait pool.
Answer: B
5. System.out.println(" baz = " + baz);
What is the result?
A. baz = 0
B. baz = 1
C. baz = 2
D. Compilation fails.
E. An exception is thrown at runtime.
Answer: B
6. Given:
11. int index = 1;
12. int[] foo = new int[3];
13. int bar