public void getLocks(Object a, Object b)
and the following instantiations:
Object obj1 = new Object();
Object obj2 = new Object();
obj1 and obj2 are accesible to two different threads and the threads are about to call the getLocks() method.
Assume the first thread calls the method getLocks(obj1, obj2).
Which of the following is true?
Select 1 correct option
1 The second thread should call getLocks(obj2, obj1)
2 The second thread should call getLocks(obj1, obj2)
3 The second thread should call getLocks() only after first thread exits out of it
4 The second thread may call getLocks() any time and passing parameters in any order
5 None of the above
Maggie when you post a question from a mock exam, you have to Quote Your Sources exactly, saying "some mock exam" is not enough. If you don't provide the exact source, I might have to delete this topic itself, so please let us know from where you got the question...