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
1 . how do u design technical documentation in abap ? 2 . what u currently devloped in sap abap ?
Explain the relationship between a functional area, user group, and query when developing queries using the sap query tool?
Which one is better joins or views and why?
What is netweaver???what is the relationship with ABAP?
Explain data dictionary in abap?
What is the function of the transport system and workbench organizer?
What is the function module to popup contents in the internal table?
Is there any BAPI to retrieve list of customers and their sales areas i.e., Cust No, Distr Channel and Division for all the customers.
What is a transport?
What are the internal tables and work area?
What is sequence number
Explain what is sap script?
How to get that a secondary index is attached to a select query?
Can a filed occur in several field groups?
Explain what is step-loop? Explain all the steps?