title: java static file loading and design pattern
body: <p>I have a class named <code>Entity</code>. it has a <code>doOperation</code> method. But this method can be used when some modules loaded. Also system needs to call this method multiple time in the first phase of the program. </p>
  
  <pre><code>class Entity{
  
  public void loadModule(){
  //load necessary files
  }
  
  public void doOperation(){
  //this method needs called multiple times
  }
  
  }
  </code></pre>
  
  <p>what happen if i set variables and methods static. is that a good design?</p>
  
  <p>What would be the best way?</p>
  
  <ul>
  <li>loading objects using constructor</li>
  <li>loading objects using loadFile() method.</li>
  <li>usage of design patterns such as singleton</li>
  </ul>