Can we instantiate abstract class?
- by satheesh.droid
I don't understand whether we can instantiate abstract class by any means because I have read we can inherit the abstract class but in have found we can create an object by calling method of other class.For example LocationProvider is an abstract class but we can create object for the same by calling getProvider() function in LocationManager class. By the following code
LocationManager lm=getSystemService(Context.LOCATION_PROVIDER)
LocationProvider lp=lm.getProvider("gps");