Muhammad Yasir Ch wrote:Why a class declared as Abstract, cannot have any abstract method declaration?
What i understand from your question: Why a class declare as abstract if it does not have any abstract method? right?
Well, we declare a class abstract when we want to give some ready made behavior to a child.
The child will have choice to override their own behavior or just simply inherit from father, this is something that we cannot achieve with *Interfaces*.
Lets say the: We have a Father class Animal for all the animals following listed two behaviors of an animal.
1. fly.
2. sound.
Each Animal can sound, but only bird animals can fly...
Check out the following example.
[Edit: more example]
Abstract class is just like a concept where its child classes are the real things. Similarly Animal itself is not something that exist in real, the Animal cat,duck, dog and so on are real objects...
Therefore, Animal class in above example is an abstract because animal is no more than a concept no one can create an object of Animal in reality Cats, Dogs, Ducks, and etc exists...
Hope this helps
Minhaj