Properties in java - can we have comma-separated keys with single value? -
I have to do multiple keys (> 1) for the same value in a property file in my Java application. An easy way to define each key in each file in the property file and the value of all these keys increases the maintenance of the asset file from this perspective. On the other hand (which I think can happen in a smart way) defines a key separated by commas with values in a row eg key1, key2, key3 = value Java.util.properties does not support outside of this box. Has anyone done similar work before? I did google but found nothing. - Manish I'm not aware of the existing solution, but it is applicable To be simple enough: string key = "key1, key2, key3", val = "value"; Maps & lt; String, string & gt; Map = new hashmap & lt; String, string & gt; (); (For string: key.split (",")) map.put (k, val); Println (map);