Update Synchronization concept in Java