In this section, you will know about the properties file. The properties file is a simple text file. Properties file contains keys and values for the specific key. Keys of properties file is always on left side and it's value is on the right side. Keys and values are separated by equal(=) sign. It is most important for the hash table. All the properties file are saved with the ".properties" extension.
java.util.properties class extends the java.util.Hashtable class. This class is used to save the properties to the stream and read the properties from the stream. You can use the properties file to store the configurable values like database connection string, user name and password instead of hard coding into the program.
Here, keys and values are specified in the properties file as follows:
#Mon Oct 23 15:16:21 GMT+05:30 2006
D =Deepak Kumar
Message= Software Development works
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: February 16, 2005 If you enjoyed this post then why not add us on Google+? Add us to your Circles