Answer Posted / rs agarwal
1. Narrow casting
2. Wide casting
Demo on "Narrow Casting" Parent class->M1 , Child class-
>M1,M2
Attributes of super class can only be accessed.
Methods defined at Super class(M1) can only be accessed.
Methods with REDEFINED Logic(M1) will be called
Methods in child class (M2) cannot be accessed
Demo on "Wide Casting" Parent class->M1 , Child class->M1,M2
Assign address of PARENT to CHILD Class object
Methods defined at child class(M2) can also be accessed
with Parent reference.
Methods with REDEFINED Logic (M1) will be called
The cast is only possible if the object was instantiated as
the child and then it was casted to the parent object and
then back again to the child object. The child has
everything the parent has so there is no problem with this
path.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between a pool table and a transparent table and how they are stored at the database level?
in bdcsome times we get the ok code for "enter" wrongly instead of '/00'.what is the reason.how we can exceed this problem.
What is the diffreence between bdc_close_group and bdc_close_dataset? : abap bdc
How we can give authorization on the fields of table control in a dialog-programming?
What is lock object ? : abap data dictionary
10) How to get Item Header in Sales Order?
What are the system fields? Explain?
What is an on”*-input filed” statement?
What is size category?
What are standard layouts sets in the sap script?
I am uploading 100 records out of which say 59th record has error so what will happen if I am using synchronous or asynchronous method of bdc? Can we update the database using local update mode how? : abap bdc
5) How to rereive text elements in SF and script?
What happens when you post goods issue after delivery? How does the inventory get reduced after the delivery?
What does the insert statement in extract datasets do? : abap modularization
What are the events in abap/4 language? : abap hr