The Java. util. Properties class can parse a properties file, which is a basic collection of key-value pairs. Properties files are commonly used to store configuration or localization data in all types of Java applications.
Using object, set the properties first in the Properties object. setProperty(String obj1, String obj2) is a method to change the properties of an object.
Then, by supplying a FileOutputStream to properties object, write it to your File. store(FileOutputStream, String)
Properties is a file extension for files that are mostly used in Java-related technologies to hold an application's adjustable settings. Java Properties files are fantastic for storing data in Java. These files are typically used to hold static information in key-value pairs.
properties file in your java project's resource folder. The properties file is saved with the extension.properties.