Multiple Choice
Examine the SharedData class shown below.Suppose two threads are created so that each has access to the same SharedData object.Thread one calls setSharedData eight times with values 1...8 respectively, sleeping for 30 milliseconds between calls.Thread two calls getSharedData eight times, also sleeping for 30 milliseconds between calls.Which of the following orders of values is not possible for thread two to receive?
A) 1,2,3,4,5,6,7,8
B) 1,2,2,4,5,6,7,8
C) 1,2,3,4,5,6,8,8
D) 1,2,3,4,5,6,8,7
Correct Answer:

Verified
Correct Answer:
Verified
Q6: Which exception must be caught or declared
Q7: Suppose run1 and run2 are objects of
Q8: For threads of equal priority, which is
Q9: Which method do you call to make
Q10: Which are ways that a thread can
Q12: Class MyClass has a single ReentrantLock object,
Q13: Assume two threads share a BankAccount object
Q15: Assume two threads share a BankAccount object
Q16: lock objects ensure that shared data are
Q105: What is the difference between the result