I'm trying to understand the concept behind abap class/interface/methods.
1. Is it mandatory to have an interface in every class?
2. Once a class is created is it right to define methods as static and public and use them without reference to the interface?
Any help appreciated.
Safe Sam replied
interfaces in ABAP Objects play the same role as classes. Just like classes, interfaces are object types that reside in the namespace of all types. While a class describes all aspects of a class, an interface only describes a partial aspect
The syntax for declaring a local interface is:
Basically, the declaration of an interface corresponds to the declaration part of a class, where instead of CLASSu2014ENDCLASS, you simply use INTERFACEu2014ENDINTERFACE. Interfaces can contain exactly the same components as classes. Unlike classes, however, interfaces don't need to be divided into different visibility sections because interface components are always integrated in the public visibility section of classes.
i dont want to confuse you .
please go to the below link to know more about... interface and classes.