A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Developer Certification (SCJD/OCMJD)
NX: About thread safe
Joined: Feb 26, 2003
Sep 12, 2003 06:36:00
Does anyone know why there is not synchronized any key word in DBAccess class? lock/unlock is not enough. There are many articles discussed that before.
Joined: Aug 21, 2003
Sep 19, 2003 14:36:00
DBAccess is an interface, so there is no need to define synchronized here.
And it's your subclass's responsibility to implement this
author and jackaroo
Joined: Mar 28, 2003
Sep 19, 2003 16:52:00
Jonathan is almost correct.
Because DBAccess is an interface, it is
to mark any of it's methods synchronized. See the
The Sun Certified Java Developer Exam with J2SE 5:
paper version from Amazon
PDF from Apress
, Online reference:
I agree. Here's the link:
subject: NX: About thread safe
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014