REPORT YSUBOOPS1.
CLASS C1 DEFINITION.
PUBLIC SECTION.
METHODS : CONSTRUCTOR .
ENDCLASS.
CLASS C1 IMPLEMENTATION.
METHOD constructor.
WRITE:/5 'I am constructor'.
skip 2.
ENDMETHOD.
ENDCLASS.
*************** main program **************
START-OF-SELECTION.
DATA: obj1 TYPE REF TO c1.
CREATE OBJECT: obj1.
Output:
I am constructor
CLASS C1 DEFINITION.
PUBLIC SECTION.
METHODS : CONSTRUCTOR .
ENDCLASS.
CLASS C1 IMPLEMENTATION.
METHOD constructor.
WRITE:/5 'I am constructor'.
skip 2.
ENDMETHOD.
ENDCLASS.
*************** main program **************
START-OF-SELECTION.
DATA: obj1 TYPE REF TO c1.
CREATE OBJECT: obj1.
Output:
I am constructor
No comments:
Post a Comment