What is the difference on using abstract class to override method and normal class to overrride method in java or any programming languages?
PrasantaPoudelBeginner
What is the difference on using abstract class to override method and normal class to overrride method in java or any programming languages?
Share
Overriding Abstract Classes in Java
In Java, it is compulsory to override abstract methods of the parent class in its child class because the derived class extends the abstract methods of the base class.
If we do not override the abstract methods in the subclasses then there will be a compilation error.
more on:
link
Thank you for your answer sir Virtual Wiz, but what am i trying to know is if we can get the same feature or functionality by overriding the normal class method then why should we use the abstract class abstract method, we can override the normal class method too. There is also a plus point on overriding the normal class methods that we needn’t need to override all the methods like abstract methods which helps in efficient coding.