Multiple Choice
Which of the following scenarios may not always cause a deadlock among two threads?
i.Thread one is in an infinite loop and has acquired a lock
II.Both threads are in an infinite loop, and one thread has acquired a lock
III.Both threads are in an infinite loop, and both threads have acquired locks
A) Only I
B) Only II
C) Only III
D) I, II, or III
Correct Answer:

Verified
Correct Answer:
Verified
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
Q18: If you do not use the Runnable
Q19: Which constructor can be used to create
Q20: The _ method stops the current thread
Q21: A program that creates a large number
Q22: If a thread sleeps after acquiring a
Q105: What is the difference between the result