what is the difference between HashMap and Hashtable

Answer Posted / regalla naresh reddy

Hash Table is a legacy Class Whereas HashMap belongs to the
collections package.

HashMap allows null key and values..but it allows only one
null key and multiple null values...Whereas the HashTable
wont allow the null key and values..

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of parseint in java?

539


Can a class have more than one object?

532


How can we pass argument to a function by reference instead of pass by value?

588


What happens when you add a double value to a string?

547


What is slash r?

545






How many types of string data types are there?

561


Can a constructor be private and how are this() and super() method used with constructor?

531


What is the list interface?

612


What is communist flag?

574


Can we serialize arraylist in java?

546


Is arraylist dynamic in java?

525


What is method overriding in java ?

666


Can a class be private?

520


What is codebase?

543


How many bits is a char?

539