Two questions regarding synchronization
- What happen if using wait and notify methods in non synchronized blocks ? Is it useful ?
Should synchronized object be the same as the object of the wait method ? Can I do like this :
synchronized (o) { try { this.wait(); } catch (InterruptedException e) { } }