title: When to use "getResourceAsStream" method?
body: <p>I was confused using the said method because while loading some properties file people are following a different approaches...</p>
  
  <pre><code>Properties prop 
   = new Properties(new FileInputStream(new File("&lt;path of the properties file&gt;"));
  </code></pre>
  
  <p>and few are using..</p>
  
  <pre><code>Properties prop 
   = new Properties(getClass().getResourceAsStream("&lt;path of the properties file&gt;"));
  </code></pre>
  
  <p>Which one to use when?</p>