What is the Purpose of Properties File in Java ?

A Properties file in Java is a list of key-value pairs that can be parsed by java.util.Properties class.

Generally a Properties file has extension .properties e.g. myapp.properties.

Properties files are used for many purposes in all kinds of Java applications. Some of the uses are to store configuration, initial data, application options etc.

When we change the value of a key in a properties file, there is no need to recompile the Java application. So it provides benefit of changing values at runtime.



You May Interest

What is the Use of Jsp:useBean in JSP ?

What is the Difference Between a Cookie and a Session Object in J ...

What is the Advantage of Using Unicode Characters in Java ?

How Can You Determine If Your Program Has a Deadlock in Java ?

What is Difference Between Include Directive and Include Action o ...