Can someone explain me how to replace value in .txt file. For example I've got a 'Test.txt' file with a line:
1,23343,EUR,1.45,${param1},Mr,${param2} and I've got a HashMap like this one below:
Map map= new HashMap(); map.put("param1", "1000"); map.put("param2", "4000"); So now I would like to use the key value of my HashMap and pass it to the .txt file but I have no idea how to do this.
My file Test.txt should look like
1,23343,EUR,1.45,1000,Mr,4000 Please, help me. Thank you in advance.
param1with1000andparam2with4000. What have you tried so far? Look into how to read, parse, and write lines in a text file. This is basic stuff.