hashtable « Thread Safe « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » Thread Safe » hashtable 

1. Hashmap and hashtable in multithreaded environment    stackoverflow.com

I am really confused on how these 2 collections behave in multithreaded environment. Hash table is synchronized that means no 2 threads will be updating its value simultaneously right?

2. thread safety of hashtable    stackoverflow.com

I have a HashTable. Now as hashtable is thread safe, so whenever i add something to list within hashtable also tread safe? eg

if hmp is my map

 hmp.get(0).add(something)

 hmp.get(0).remove(0)
Are these operations thread safe? ...

3. Is java.util.Hashtable thread safe?    stackoverflow.com

It's been a while since I've used hashtable for anything significant, but I seem to recall the get() and put() methods being synchronized. The JavaDocs don't reflect this. They simply say ...

4. Will there be any senario where Hashtable and Vector need special code for thread safety    coderanch.com

Hi, While going through java tutorials i read we can use Hashtable and Vector collection object's if we need thread safety. I need to know whether there will be any senario where we need to have extra code for handling thread issues even though we are using able collections ? Thanks Harish

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.