Can we instantiate an abstract class?
<p>I have read we can only instantiate an abstract class by inheriting it, but we cannot instantiate it directly.<br>
However, I saw we can create an object with the type of an abstract class by calling a method of another class.<br>
For example - <code>LocationProvider</code> is an abstract class, and we can instantiate it by calling <code>getProvider()</code> function in the <code>LocationManager</code> class:</p>

<pre><code>LocationManager lm = getSystemService(Context.LOCATION_PROVIDER);
LocationProvider lp = lm.getProvider("gps");
</code></pre>

<p>How is the abstract class instantiate here?</p>
