What is a deadlock in Java?
A deadlock is when a thread waits for another thread to complete, but that second thread is waiting for the first thread, creating a circular dependency.
Thatâ€™s partially correct. Deadlocks involve circular waiting, but they can also be triggered by resource contention or improper lock management.
Can you describe how to identify and resolve deadlocks in Java using tools like `jstack`?