I have a volatile field in a class, I have a method which modify this field, this method can be invoked by different threads.
Must the method be synchronized or not ?
I have a volatile field in a class, I have a method which modify this field, this method can be invoked by different threads.
Must the method be synchronized or not ?