Question 7 :


Which of the following statements are true about the sleep method of Thread class?
 
Select two choices.
Picture


Question 8 :

What would be the result of an attempt to compile and run the following code? 
Choose one answer.
Picture
a .The code compiles fine and prints Two, One, and Three in order and repeats the same for another             19times. 
b. The code compiles fine and prints Two 20 times, One 20 times, and Three 20 times sequentially.             However, the order whether Two will come first, then One, and at last Three is not guaranteed. 
c. The code compiles fine and prints Two 20 times, One 20 times, and Three 20 times sequentially at the behavior is guaranteed. 
d. The code compiles fine and prints Two, One, and Three 20 times each in an indefinite order. 
e. The code compiles fine but throws InterruptedException due to synchronization of msg String in a             wrong way.


Question 9 :


Which of the following statements are true about synchronization? 
Select two choices.
Picture
<<< Previous Page     Next Page >>>


ALL about SCJP = SCJP 1.6, mock, certification, scjp 1.5 , scjp questions, scjp books, scjp hand written notes, scjp dumps, scjp trainings, scjp video tutorials, scjp simulators etc.