Difference between Hash Table and Hash Map?

Answer Posted / santosh nayak

HashMap hm=new HashMap();
hm.put("s","s");
hm.put("a","a");
hm.put(null,"r");
hm.put(null,"t");
hm.put("e","e");

This is the code where we can allow multiple null key values
in HashMap.

Is This Answer Correct ?    1 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object-oriented paradigm?

817


How do you declare a string variable?

735


How many bytes is a string java?

742


what is the difference between the methods sleep() and wait()? : Java thread

722


Is zero a positive integer?

764


What is foreach loop in java?

744


What happens to a static var that is defined within a method of a class?

766


What does java stand for?

776


List the three steps for creating an object for a class?

720


What are the differences between c++ and java?

808


Can you override private or static method in java?

754


What is a treeset in java?

739


We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.

1700


How do you write a conditional statement?

703


How to find the largest value from the given array.

748