my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Which one  best replaces HashMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Which one  best replaces HashMap" Watch "Which one  best replaces HashMap" New topic

Which one best replaces HashMap

Arjun Karthick
Ranch Hand

Joined: Jan 04, 2007
Posts: 77
Hi all,
I was using HashMap to store the configuration details as name/value pair.This causes lot of objects to be created at runtime as there are lot of name/value pair under different section in the configuration in which each section requires a new hashmap.

Is there any alternative way to store the name/value pair of configuration in a more efficient manner.How good does properties file suit this requirement.
Please suggest me in this.
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Hi Arjun,

Are you talking about Properties class of "java.uti.Properties"?
Give little more detail what configuration you put in the HashMap and find Properties a suitable sunbstitute of HashMap.

Thanks and Regards,

Arjun Karthick
Ranch Hand

Joined: Jan 04, 2007
Posts: 77
yes i mean
My HashMap will look like this

Does this can be handled using properties file?

I agree. Here's the link:
subject: Which one best replaces HashMap
Similar Threads
decoding binary arrays/boolean arrays
Storing ActionForm&action class-WHERE?
does proprties file has the ability of hashmap
parsing data from MQ and passing to other classes