title: How does Class.forName() work?
body: <p>I just learned about <code>java.sql package</code>. It uses <code>Class.forName()</code> to dynamically load the driver which extends <code>DriverManager</code>.
  Then we get connection using <code>DriverManager.getConnection()</code> method.</p>
  
  <p>So how does the entire thing work?<br>
  How does DriverManager class know how to get the connection without using class name of the actual driver.</p>
  
  <p>Also can we use Class.forName() for custom applications... if this is explained with an example I will be very happy.</p>