Amazon Interview Question
Software Engineer / Developers> with out using Synchronized method , synchronize block or volatile keyword
Short of rooting around in java.util.concurrent, it's impossible to do mutual exclusion portably in Java. (In before Peterson's algorithm etc.; Java implementations are not required to be sequentially consistent.)
atomic instruction + memory fence instructions
- sam September 08, 2011