Differences between Abstract class and interfaces
Abstract classes:
* In Abstract class have at least one abstract method and others can non-abstract methods.
* Abstract methods can be public, private or protected.
* We need to redefine the abstract method to implement the method in sub class. we cannot redefine static methods.
* Multiple inheritance is not possible.
Interface:
* All methods are abstract methods in interfaces.
* All methods are public.
* No need to redefine method. we can write the code by clicking on source code button.
* Multiple inheritance is possible.
************************Thank you ************************
Comments
Post a Comment