Question: 12. Recall that a superclass reference variable can be used to point to subclass objects. The following code needs to have one cast in order

 12. Recall that a superclass reference variable can be used to

12. Recall that a superclass reference variable can be used to point to subclass objects. The following code needs to have one cast in order to compile. Where should the cast be placed in the code? String str 1= "hel2o"; Object obj 1= str1; String strz=obj 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!