How to read a properties file in Java?

+1 vote
asked Dec 15, 2016 by Hitesh Garg (352 points)  

My application depends on two dates i.e. start and end date and user has to set the dates before running the program. I have decided to keep them in the .properties file in my resource folder of maven architecture.

I am not able to read and get the data from the file. How to do that if the file lies inside src/main/resources/

Please log in or register to answer this question.
