what is the difference between HashMap and Hashtable

Answer Posted / suresh

HashMap hm=new HashMap();
hm.put("1","11");
hm.put("2","22");
hm.put("3","33");
hm.put("4","242");
hm.put(null,null);
hm.put(null,null);
HashMap also allow more null values

Is This Answer Correct ?    24 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are getters and setters used?

580


What is a return in java?

562


what is synchronization? : Java thread

565


What are default methods ?

586


Name the components that are termed to be Heavy-weight component but available in Light-weight components?

1989






What is a layout manager and what are different types of layout managers available in java awt?

733


Mention a package that is used for linked list class in java.

534


how come we know the object is no more used in the class?

5461


What is reverse function?

585


What do you mean by exception handling in Java?

668


Write a function to print Fibonacci series and Tribonacci series?

764


What is the access scope of protected access specifier?

542


What is type safety in java?

497


Why java is called not pure object oriented language?

585


Explain notifyall() method of object class ?

672