What happens when a method in super class is synchronized, but you override the method in a subclass and don't synchronize it ?
Asked
Active
Viewed 2,827 times
1 Answers
5
If a method in super class is synchronized, but you override the method in a subclass and don't synchronize it, then the method is no longer synchronized if called on the subclass.

xagyg
- 9,562
- 2
- 32
- 29
-
1Likewise, a subclass can add synchronization to a method that a superclass does not have synchronized. – Paul Jackson Jun 07 '13 at 13:48
-
1If your subclass foo() method calls super.foo() then you will be synchronized during the super invocation. – Pace Sep 13 '13 at 13:12