cancel
Showing results for 
Search instead for 
Did you mean: 

HashMap( );

Former Member
0 Kudos

Hi every one,

Can anyone send me

what is mean by HashMap( );

functions?Use?

Accepted Solutions (1)

Accepted Solutions (1)

former_member186016
Active Contributor
0 Kudos

Hash Map is basically a data structure provided in java collection framework.

javadoc : http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html

Usage example:

http://mindprod.com/jgloss/hashmap.html

Regards,

Ashwani Kr Sharma

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks for every one

Former Member
0 Kudos

Hai vinod,

Hashmap is used to Store the values in Key-value format.

public static void main(String[] args) {

Map hs=new HashMap();

hs.put("EN","English");

hs.put("DE","German");

System.out.println((String)hs.get("EN"));

}

Regards,

Naga

Former Member
0 Kudos

hi vinoth,

The HashMap gives you an unsorted, unordered Map. When you

need a Map and you don’t care about the order (when you iterate through it), then

HashMap is the way to go. HashMap allows one null key in a collection and multiple null values in a collection.

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Check this link to know about it.

http://www.java-tips.org/java-se-tips/java.util/how-to-use-of-hashmap.html

Regards,

Vijai