title: Best way to access properties from property file in java
body: <p>I have properties file <code>app.properties</code> and it has 50 different properties.
  I am accessing those in my java class using</p>
  
  <pre><code>Properties prop = new Properties();
  prop.load("app.properties");
  
  System.out.prinltn(prop.getProperty("APPNAME"));
  </code></pre>
  
  <p>Actually, I want to get rid of accessing property like <code>prop.getProperty("APPNAME")</code>. Is there any best way in java to access properties.</p>
  
  <p>I can declare all variables as static in java class.</p>
  
  <pre><code>static String appName = prop.getProperty("APPNAME");
  </code></pre>
  
  <p>Any other best way available?  </p>