Reputation: 11782
I am using following code:
public boolean initialSetupDone;
public Currency defaultCurrency;
public String userId;
final String kProfileSetupDoneKey = "kProfileSetupDone";
final String kDefaultCurrencyKey = "kDefaultCurrency";
final String kUserIdKey = "kUserIdKey";
String
values are the keys while others are the values.
Please tell me how can i store these values as HashMap
. I have tried to do it with Dictionary
, but can't find any good way to do it.
How can i do that
Best Regards
Upvotes: 0
Views: 1680
Reputation: 47607
Like this, but is usually not a good idea to mix types in a map:
Map<String, Object> map = new HashMap<String, Object>();
map.put(kProfileSetupDoneKey , initialSetupDone);
// etc...
Upvotes: 2