Question 4 : 

There are three Threads trying to invoke a method of an object. This method is a synchronized method to prevent conflict between Threads. While Thread1 is executing the method, Thread2 and Thread3, in that order attempt to invoke the method. 

What happens when Thread1 exits the method?
Picture

Question 5 : 

What will happen when you attempt to compile and run the following code? 
Picture
Choose one answer.
a. It will print - ABC XYZ ABC XYZ in that sequence. 
b. It will print - ABC ABC XYZ XYZ in that sequence 
c. It will print - ABC and XYZ twice, but the sequence cannot be determined.
d. It will print - abc and xyz twice, but the sequence cannot be determined. 
e. The code will not compile.

 
Question 6 : 

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.