Synchronized Methods in Java Threads: Preventing Race Conditions | Java Synchronization