title: How to read a properties file in Java?
body: <p>I am using servlets where I hard-code the database connection details, so if make any change I have to recompile the code. So instead I'd like to use a <code>.properties</code> file (which I can modify later) and use that as the source for my database connection.</p>
  
  <p>The problem is I don't know how to read the property file. Could someone please help me to read the file?</p>