Home Java Example Java Util Properties Properties file in Java



Properties file in Java
Posted on: February 16, 2005 at 12:00 AM
In this section, you will know about the properties file. The properties file is a simple text file.

Properties file in Java

     

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. 

Properties class:
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
vk=Rosé.Net
RI=RoseIndia.Net
23 =Delhi
D =Deepak Kumar
Message= Software Development works

Related Tags for Properties file in Java:


More Tutorials from this section

Ask Questions?    Discuss: Properties file in Java  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.