Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCMJD
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Developer Certification (OCMJD)
Locking
Mike Yu
Ranch Hand
Posts: 175
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Max,
In your book, you synchronized the lock on a Vector object. What are the differences if I synchronize on the methods?
Thanks,<br />Mike
Vlad Rabkin
Ranch Hand
Posts: 555
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Max,
One more question: Why did you used Vector instead of ArrayList in your book? There is no need for it since you synchronize access to on reservedDVDs.
Just because a junior programmer is more familiar with Vector ?
Tx,
Vlad
Mark Spritzler
ranger
Posts: 17347
11
I like...
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I'd stick with the ArrayList. It is the preferred Collection to use over Vector.
Mark
Perfect World Programming, LLC
-
iOS Apps
How to Ask Questions the Smart Way FAQ
Mike Yu
Ranch Hand
Posts: 175
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Max,
How about HashMap?
Also can you answer my question at the beginning of this
thread
?
Thanks,<br />Mike
please buy this thing and then I get a fat cut of the action:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Nagging Question on Threads
Synchronized
wait() and notify() problem
locking??
exception in sync block
More...