will deadlock occur in these Java situations
1-
synchronized(obj) {
obj.syncMethod(); // the method signature: public synchronized void syncMethod() {...}
}
2-
synchronized(obj) {
if (condition)
throw new Exception(); // deadlock because obj lock is not released?
// do other stuff
}
Thank you.