Dynamic class loading
<p>Why do we need to use dynamic class loading? Classes are loaded when we use them at first time, so if we don't use the class, it will never be loaded.
Even if we use dynamic class loading:</p>

<p>A a = (A)Class.forName("A").newInstance();</p>

<p>we still have to know about A class at compile time. If we need to use class A we can simply create it using constructor(and it will be loaded into memory):</p>

<pre><code>A a = new A();
</code></pre>

<p>If we don't need any instance of A class the code that contains an invocation of constructor of A class will never be executed, so it will never be loaded to the memory</p>
