• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

syn methods

 
cybel sheriden
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

can a synchronized method be overridden in the subclass, if yes wht is the effect ,is the overridden method too synchronized.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Threads and Synchronization...
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
synchronized is not inherited,

The code in the overridding method may be quite different and not require a lock to be thread-safe.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic