Which of the following is an example of a situation that can cause a deadlock in Java?
Thread 1 holds Lock A and is waiting for Lock B, while Thread 2 holds Lock B and is waiting for Lock A
Two threads are accessing the same resource at different times
One thread has completed execution, and the other is waiting for its result
Threads are executed in a random order
