Overriding a synchronized method

前端 未结 1 538
渐次进展
渐次进展 2021-01-18 18:29

What happens when a method in super class is synchronized, but you override the method in a subclass and don\'t synchronize it ?

1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-18 18:56

    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.

    0 讨论(0)
提交回复
热议问题