0

I have searched for the exact answer but not able to find satisfactory way to understand the actual cause. Why abstract class have no issue without abstract method? What is different scenarios in which we should write abstract method inside a abstract class and in which we didn't?

Sai prateek
  • 11,842
  • 9
  • 51
  • 66
  • 1
    Someone should vote for reopening. @Saiprateek: Let's pretend we have an abstract class `Person`. It implements everything a person can do and what defines a person (for your project), like a name, an age etc. Now every implementation of a person sets the data of that person and inherits every ability of the parent class (e.g. `Public class Thomas extends Person` or `public class Maria extends Person`). Now it is possible to create new intances of these sub classes without allowing the program to create new and unwanted persons (i.e. `new Person("name");` is not possible). – Tom Sep 21 '14 at 11:17
  • Your title is back to front. It *is* necessary for a class with abstract methods to be declared `abstract.` It isn't necessary for an abstract class to have abstract methods. – user207421 Sep 22 '14 at 01:41

0 Answers0