aspose file tools*
The moose likes Beginning Java and the fly likes Upcasting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Upcasting" Watch "Upcasting" New topic
Author

Upcasting

James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580



usung b is it possible to call the fun() of the Class A which is overridden in B


SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
usung b is it possible to call the fun() of the Class A which is overridden in B


Could you please share, why would you want to call A's fun instead of B's when its already overridden in B? Because this is the way it is expected to work.


Thanks and Regards
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

@ Satya Maheshwari

I agree with you.... But i was just trying out if it is possible??
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Upcasting