AtomicLong can make sure at one time only one thread can use it

lock can lock a section of a procedure to ensure that only one thread to run the section of the procedure

synchronized is  the synchronization of language'leve