I have superclass Point
and a synchronized
method draw()
. Will the subclasses of Point
inherit synchronized
if I override method draw()
in them or I have to always write it?
No, you will always have to write synchronized
. If you call the synchronized method of the super class this will of course be a synchronized call. synchronized
is not part of the method signature.
See http://gee.cs.oswego.edu/dl/cpj/mechanics.html for detailed description from Doug Lea, Java threading boss (or so).