There is no object of Abstract class because it is abstract. For example, the class of Animal can be a abstract superclass, which means there is at least one abstract method (function) in the Animal class.
abstract class Animal{
private int itsAge;
public int getAge() {
return itsAge;
}
public abstract void move(); //abstract function
}
Because Animal is abstract class, you cannot do this:
Animal a = new Animal (); //Animal is abstract; cannot be instantiated
In the other word, object can only exist when the class is conrete class. You can derived the Cat class from Animal Class, and implement the move method, then you can do this:
Animal a = new Cat (); //object of Cat is also the object of Animal;
April 24, 2007 at 1:21 pm
Oh wait. Yes, I have. I’m sorry, but I just don’t have it in me right now to type it all out again. Besides, it was just ramblings anyway. You didn’t want to hear me go on and on about this, right?
December 10, 2007 at 12:04 pm
Thank you !!! I was having a problem regarding this topic π
May 2, 2008 at 2:10 am
Thanx! But still give some more detail.
June 19, 2008 at 11:10 am
Somehow i missed the point. Probably lost in translation π Anyway … nice blog to visit.
cheers, Curtsy.
September 29, 2008 at 11:17 am
succinct but some addition shall be even greater. like cat class π
April 29, 2014 at 9:40 pm
Enjoyed studying this, very good stuff, regards . A man may learn wisdom even from a foe. by Aristophanes. kekcedddcbee
March 21, 2019 at 11:34 am
Expenses range between 5,000 to 60,000.