`volatile` allows for safe multi-threaded reading, `synchronized` allows for safe multi-threaded writing.