Ansicht
Dokumentation

ABENINHERITANCE_ABSTRACT_FINAL - INHERITANCE ABSTRACT FINAL

ABENINHERITANCE_ABSTRACT_FINAL - INHERITANCE ABSTRACT FINAL

Addresses (Business Address Services)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

- Abstract and Final Methods and Classes

Abstract and final methods or classes can be defined using the additions ABSTRACT and FINAL of the statements METHODS and CLASS.

Abstract methods are declared in abstract classes and cannot be implemented in the same class, only in a subclass of the inheritance tree. Abstract classes cannot, therefore, be instantiated. A non-abstract method is a concrete method. With the exception of the instance constructor, concrete instance methods of a class can also call their abstract methods.

Final methods can no longer be redefined in subclasses. They cannot have any additional subclasses and close an inheritance tree definitively.

Notes

  • In classes that are both abstract and final, only the static components can be used. Although instance components can be declared, they cannot be used. Specifying ABSTRACT and FINAL together is therefore only useful for static classes.
  • Private methods cannot be redefined and therefore cannot be abstract.





PERFORM Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 1418 Date: 20240426 Time: 090036     sap01-206 ( 34 ms )