Reading Property File using Java Program Example

Reading Property File using Java

In this tutorial, I am attaching Simple program about Reading Property File using Java. The example Java Program were tested with environment and output is shared in the same post.

ReadPropertyFile.java

myproperty.properties

The properties files are basically used to store configuration data in form of Key-Value pair. you see the content of the myproperty.properties file below.

#This is property file

label.firstname = Dinesh
label.lastname = Krishnan
label.greetingmessage = Thanks for reading my articles.

# You can add Key-Value pair accordingly

Output

—————–
Hello everyone,
Thanks for reading my articles.

Regards
——————
Dinesh Krishnan