How can u tell HashTable is Synchronized?(IBM-chennai)

Showing Answers 1 - 6 of 6 Answers

Justin

  • Oct 20th, 2005
 

HashTable is Synchronized, at a time only one thread or process can take up the HashTable object instace and do the modifications and other process.

  Was this answer useful?  Yes

yaz

  • Jan 13th, 2006
 

Hashtable is not synchronized

  Was this answer useful?  Yes

Hoang

  • Feb 9th, 2006
 

I'm not agree with someone said that Hashtable is not synchronized. That's wrong!!Plz, look at website http://java.sun.com/j2se/1.5.0/docs/api/index.html for more information.

chandra

  • Feb 14th, 2006
 

This example creates a hashtable of numbers. It uses the names of the numbers as keys:

     Hashtable numbers = new Hashtable();     numbers.put("one", new Integer(1));     numbers.put("two", new Integer(2));     numbers.put("three", new Integer(3)); 

To retrieve a number, use the following code:

     Integer n = (Integer)numbers.get("two");     if (n != null) {         System.out.println("two = " + n);     } 

As of the Java 2 platform v1.2, this class has been retrofitted to implement Map, so that it becomes a part of Java's collection framework. Unlike the new collection implementations, Hashtable is synchronized.

Hashtable is synchronized

John

  • Apr 3rd, 2007
 

HashTable is synchronized

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions