title: Why should the getInstance() method in Factory pattern be static?
body: <p>In most of the factory pattern implementations, the <code>getInstance</code> method is <em>usually</em> declared as static. The main advantage of factory pattern is to hide the implementation details, but why does <code>getInstance()</code> method needs to be static? Is instantiating a new Factory Object a bad practice?</p>
  
  <pre><code>XYZFactory factory = new XYZFactory(); 
  XYZObj obj = factory.getInstance(TYPE);
  </code></pre>
  
  <p><strong>Vs</strong></p>
  
  <pre><code>XYZObj obj = XYZFactory.getInstance(TYPE);
  </code></pre>