title: Difference between Loading a class using ClassLoader and Class.forName
body: <p>Below are 2 code snippets</p>
  
  <p><strong>The first one uses ClassLoader class to load a specified class</strong></p>
  
  <p><code>ClassLoader cls = ClassLoader.getSystemClassLoader();
  Class someClass = cls.loadClass("TargetClass");</code></p>
  
  <p><strong>The second one uses Class.forName() to load a specified class</strong></p>
  
  <p><code>Class cls = Class.forName("TargetClass");</code></p>
  
  <p>What is the difference between the above said approaches. Which one serves for which purpose?</p>