Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hash Map

 
mythily prakash
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could any body tell me how to create a Hash Map in java.I just want to use it inorder to reduce the Ifs in my program.
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mythily prakash:
could any body tell me how to create a Hash Map in java.I just want to use it inorder to reduce the Ifs in my program.


I guess this question should go Java in General (beginner)

To answer your query what is your requirement?

You can crate HashMap using its default or other constructors. For ex:
HashMap hashMap = new HashMap() and then put values using put() method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic