Aternative to storing settings in hashmap of the object data type in java? -
alternative storing settings in hashmap of object in java?
private static hashmap<string, object> settingsmap = new hashmap(); public static void addsetting(string name, object value) { settingsmap.put(name, value); } public static object getsetting(string name) { return settingsmap.get(name); } public static void setsetting(string name, object value) { settingsmap.replace(name, setting); }
the properties class option that. stores values strings. if feasible in scenario, easy feature save , load properties from/to file via single method calls.
Comments
Post a Comment