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
Can you create an internal table dynamically?(at run time)
What are the client dependant objects in abap / sap?
What are the different software packets available in the market? : sap abap hr
hi,how to diable the popup window which is displayed afetr executing the SAP script program?
Explain different types of locks?
Kindly help me to Know the process of mapping in EDI from R/3 to a convertor(third party which translates IDoc flatfile to EDIFACT /XML / FTP /HTTP ) ?
What are the basic functions of database utility?
what is sap scriptview ?
What is tcode se16. For what is it used. Explain briefly?
What is the disadvantage of using exec sql statement in abap?
Explain the difference between domain and data element? What are aggregate object?
Specify the types of data dictionary objects.
What are smart forms?
Why grouping of fields is required? What is the max no of modification groups for each field?
What are number ranges?