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

What are static blocks and static initalizers in java ?

578


How do I know if java is installed?

508


when to use ArrayList and when to use HashMap in webApplication.

3872


Which of the following is not an isolation level in the JDBC

1604


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

502






What is the functionality of the stub?

563


What is a parameter used for?

507


What does bitwise or mean?

560


What is object of class in java?

588


Why is it called a string?

555


What do you understand by the term polymorphism?

620


Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?

544


How many bits is a float?

527


What are operators and its types?

563


What are methods?

544