what is the difference between HashMap and Hashtable

Answer Posted / brijendra kumar soni(xavient)

1-Hashmap is nonSyncronized whereas Hastable is Syncronized.

2-Hashmap allows both key and values are Null whereas
Hastable doesnot allow Null values.

3-Hasmap belongs to Collection package whereas Hashtable is
a class.

4-The class Hashmap implements the map interface whereas
Hastable implements the class.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between string s= new string (); and string s = "abv";?

744


What is formatted output?

514


What is the purpose of an interface?

558


How many types of constructors are used in java?

543


What is the use of bufferedreader?

533






How many digits can a float hold?

537


What are the advantages and disadvantages of reference counting in garbage collection?

579


How do you clear an arraylist in java?

502


How do you empty a list in java?

545


Is string passed by reference in java?

549


What modifiers may be used with a top-level class?

578


How do you convert bytes to character in java?

539


What two classes are used to read data only?

643


What variables are stored in stack?

532


How the interruptible method gets implemented?

569