‎2008 Feb 06 10:24 AM
hi all,
what do you mean by
CALL METHOD SUPER->CONSTRUCTOR
Thanks in advance,
Alex.
‎2008 Feb 06 11:03 AM
It will call the Super class constructor.
This is only exceptional case we use "call method " for constructor.
wheneve we create a object of the class. The Instance constructor is executed.
ex:
class c1 definition.
public section.
methods: constructor.
endclass.
class c1 implementation.
method constructor.
some code.
endmethod.
endclass.
class c2 definition inheriting from c1.
public section.
methods: constructor.
endclass.
class c2 implementation.
method constructor.
calling the super class constructor.
call method super->construtor.
endmethod.
endclass.
start-of-selection.
data: obj type ref to c2.
create object obj.
If it helpful rewards ponits.
Regards
Pratap.M
‎2008 Feb 06 11:03 AM
It will call the Super class constructor.
This is only exceptional case we use "call method " for constructor.
wheneve we create a object of the class. The Instance constructor is executed.
ex:
class c1 definition.
public section.
methods: constructor.
endclass.
class c1 implementation.
method constructor.
some code.
endmethod.
endclass.
class c2 definition inheriting from c1.
public section.
methods: constructor.
endclass.
class c2 implementation.
method constructor.
calling the super class constructor.
call method super->construtor.
endmethod.
endclass.
start-of-selection.
data: obj type ref to c2.
create object obj.
If it helpful rewards ponits.
Regards
Pratap.M
‎2008 Feb 07 5:11 AM
Hai.
CALL METHOD SUPER->CONSTRUCTOR means you are calling superclass constructure directly.
regards.
sowjanya.b