OOPS ABAP: 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 can not redefine static methods.
- Multiple inheritance is not possible.
Interfaces:
- 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.
Comments
Post a Comment