title: DAO Factory Pattern Example
body: <p>I'm using this link as my basis <a href="https://stackoverflow.com/questions/6401543/what-is-dao-factory-pattern">link</a> as The example given seemed simplest to start with from the other examples on the net. Can someone please explain why:</p>
  <ol>
  <li><p>I can understand the implementation and the interface codes. But why are they returning an interface?</p>
  </li>
  <li><p>Also, while they're checking for string equals &quot;jdbc&quot;, in both cases they return the same statements. This is where I get confused. Shouldn't they be returning different implementations of the same interface?</p>
  </li>
  </ol>
  <p>Thanks!</p>