If in a class I have a ConcurrentHashMap instance that will be modified and read by multiple threads I might define like this:
public class My Class { p
volatile modifier guarantees that all reads and writes go strait to main memory, i.e. like the variable access is almost into synchronized block. This is irrelevant for final variable that cannot be changed.
volatile
synchronized