This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have heard that Properties class/file is very helpful whenver you want to add something new to existing,instead manipulating the java code, you can just add new things to properties file and that will reflected in your o/p when you compile java code.
Can someone please explain its use with example please..... I will be thankful to you all.
Hi, I am giving a small example of how to read the properties file. In the properties file, i am using Driverclass, Drierurl, username and password which are useful for obtainging database connection. I am reading the properties file through java code. So, later when you change the driver also, just change the properties file. ans Run the program, all the changes will be reflected in your program.
while running the above file use java -DFile="Path where you stored the file.props file"