Answer Posted / Varun Tiwari
"In SAP ABAP (Object Oriented), there are two primary types of constructors: the initializing constructor and the non-initializing constructor. The initializing constructor is called automatically when a new object is created, and it usually initializes the attributes of the class to default values or specified initial values.nn```abapnCLASS zcl_example DEFINITION.n PUBLIC SECTION.n METHODS: CONSTRUCTOR,n initialize.nENDCLASSnCLASS zcl_example IMPLEMENTATION.n METHOD CONSTRUCTOR.n .n ENDMETHODn METHOD initialize.n .n ENDMETHODn``` In the example above, CONSTRUCTOR is a non-initializing constructor, which can be called explicitly if needed. The initializing constructor would typically be defined implicitly by the system when no explicit constructor is provided."
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category