I am little confused in understanding the role of 'this' in a synchronized block. I have some basic understanding of what synchronized block is used for. This article says -
Don’t synchronize on the non-final field on synchronized block because the reference to the non-final field may change anytime and then different threads might synchronize on different objects i.e. no synchronization at all.
I am unclear on what does it actually mean. Can someone please guide me in understanding what the this actually is in this context and why non-final fields are not supposed to be synchronized in synchronized block.