|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Tutorial on Wide casting
Implementation of Wide casting:- From below screen shot we implement
the wide casting.
now refers to the object of the subclass 'object_subclass'.
Thus the 'area'
method of the superclass cannot be called by this object. In order to enable it
to call the 'area'
method of the superclass, wide casting has to be performed.
right hand side of wide casting always has object of super class. Left side of
wide casting always is object reference declared as ‘type ref to’ to super
class. Now method area of super class is called again to find the area of rectangle.
Note:- Wide Casting cannot be performed on sub
class objects. It can only be performed on super class objects that have narrow
Summary:- The assignment of a superclass instance to a reference variable of
the type "points to sub class" is described as a Wide casting, because
here we are switching from a more generalized view to a one with more
REPORT yh_wide NO STANDARD PAGE HEADING.
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards