aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Looking for a strategy for solving upcasting/downcasting questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Looking for a strategy for solving upcasting/downcasting questions" Watch "Looking for a strategy for solving upcasting/downcasting questions" New topic
Author

Looking for a strategy for solving upcasting/downcasting questions

O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

Does anyone have any workable strategy for solving casting questions? I understand when upcasting and downcasting is allowed but when the questions tend to have multiple objects involved i tend to get confused pretty quickly. For example, what is the best approach to a question like this:



Is there any approach to use to solve a question like above? For example can the references be drawn somehow so that i can get a visual representation and can that help?

Thanks
Abdullah Mamun
Ranch Hand

Joined: Mar 19, 2007
Posts: 99

I usually would like to execute each line and put the updated result beside the same line.
Below is an example in comment.
Not sure if it will help you.



MooN
 
jQuery in Action, 2nd edition
 
subject: Looking for a strategy for solving upcasting/downcasting questions