Java 5. Atomic Reference
Notable Java 5 features:
- Generics!
AtomicReferencewas introduced to leverage i486 CMPXCHG instruction — now we can stop usingsynchronized, but it’s hard to do because it metastasized into the whole codebase- varargs
- enums
- auto boxing/unboxing
- foreach loop