what is the difference between HashMap And HashTable?

Answer Posted / venkateswarlu

HashMap :
->It is a key,value pair.
->key are not duplicated but values can be duplicated.
->Null key is possible.
->It is not Synchronized by default.

Hashtable:
->It is also key,value pair but both are Strings only.
-> Keys are not duplicated but values can be duplicated.
->Null insertion is not possible of both(key and value).
->It is Synchronized by default.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain list interface?

735


Explain the concept of proper inheritance?

847


Can a abstract class be declared final?

802


What is double data type?

746


Which oo concept is achieved by using overloading and overriding?

783


What is natural ordering in java?

748


Why string is not a wrapper class?

913


What is a dot notation?

783


If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?

951


What are the main uses of java?

776


Are strings immutable in java?

749


What is immutable in java?

794


what is predefined function in java?

765


List down the methods and interfaces of collection class in java.

773


What are the elements of java?

793