on 05-28-2007 8:10 AM
Hi every one,
Can anyone send me
what is mean by HashMap( );
functions?Use?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for every one
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi vinoth,
The HashMap gives you an unsorted, unordered Map. When you
need a Map and you dont 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.