the method is synchronized, means only one thread runs the method fully and returns...now my question when a method is synchronized then instance members(data/method) used inside it, are synchronized or not?
Not necessarily. Another thread could be running another method which also changes those values. You have not locked on the object itself or its members, just the method.
When a thread is executing a synchronized block other threads can not access any methods or members of that class if it is object level lock. Else they can execute.
Comment