Programming Interview: Java Threads wait, notify and synchronized