Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
This is to ask about java.util.Properties;
As we use the same to deal with Properties files, I would like to know that, if I need to modify the value of some key, or delete the existing key value pairs, what measure do we need to take.
I tried and found that Properties.setProperty is helpful in setting the property in property file but Properties.remove removes temprorily and does not reflect the changes in actual properties file, i.e. file remains the same and key value pair does not removed from the file.
Please help and it would be great if anyone would provide the code snippet for the same.
0 · ·