Create Synchronization concept in Java