I have to edit the existing file named root.propertis and update it without saving in to another file
Following is the sample proprety file.
root.label.getmore=Mehr Apps
root.msg.apps=Apps
root.label.2.2=Coupons
root.label.35.2=MSNBC
root.label.43.2=PBS Kids
root.label.47.2=Yahoo! Digest
I have to update the string in the file "root.label.43.2=PBS Kids" to "root.label.43.2=Updated"
But i need to save in the same file (root.propertis )by repalcing the string root.label.43.2=PBS Kids.No need to update the changes in another properties file.
Use java.util.Properties:
The call
p.store()to save to a file.Note exception handling has been omitted.