java - Want to use properties file for storing and for reading hashmap -
i have codes , corresponding states it. i want read properties file data. not reading if populate data file. hence have supply externally using file writer. if populate data , read give error as: file not found exception i want data when letter in key asked. when write m, want data key starting m. eg m - mh:maharashtra,mn-manipur,ml=meghalaya,... my code far: public class codeproperties { public static void main(string[] args) { createcodeprop(); map<string, string> props = loadcode(); printconsole(props); } // write new properties file in java private static void createcode() { properties p = new properties(); p.setproperty("mh", "maharashtra"); p.setproperty("sk", "sikkim"); p.setproperty("mp", "madhya pradesh"); p.setproperty("mn", "manipur "); p.setproperty("ml", "meghalaya"...