I am having trouble figuring out how to read and write data to and from a file where my values are encapsulated in double quotations.
I am a novice programmer and confused on how to use the pattern regex to get around the issue and am hoping there is another way.
my data file I need to read from is formatted as follows:
type = "sedan"
productID = "000123"
price = "30000"
Also when I write to the file I need to follow the same format and I cannot figure out how to do it. So far I have the following:
PrintWriter fileWriter = new PrintWriter("products.txt", "UTF-8");
fileWriter.println("type = " + pTemp.getType + """);
which does not work either.
If anyone could help it would be greatly appreciated.