I have an issue.
I have a properties file. I want to store some values in that file and will implement in the code whenever it is required. Is there any way to do t
Your problem is not clear since Writing/reading from properties files is something already available in java.
To write to properties file you can use the Properties class as you mentioned :
Properties properties = new Properties();
try(OutputStream outputStream = new FileOutputStream(PROPERTIES_FILE_PATH)){
properties.setProperty("prop1", "Value1");
properties.setProperty("prop2", "Value2");
properties.store(outputStream, null);
} catch (IOException e) {
e.printStackTrace();
}
Source and more examples here