Question: class AppDemo public static void main(Stringl) args) t Sup superOb- new SupO; Subl subObl new Sub1O Sub2 subOb2- new Sub20: Object[l objArray- new Object3] objArray[0]-

 class AppDemo public static void main(Stringl) args) t Sup superOb- new

class AppDemo public static void main(Stringl) args) t Sup superOb- new SupO; Subl subObl new Sub1O Sub2 subOb2- new Sub20: Object[l objArray- new Object3] objArray[0]- superOb; objArray[I] subOb; objArray[2]-subOb2 Sup supRef for(Object obj : objArray) Il supply the missing code You are asked to write missing code according to the following requirements: 1) Output a message "The subOb2's oddBall() called" to the standard output device (text output only) 2) You must achieve this by using "supRef to call the "oddball()" method in the Sub2 class. 3) Your code must not crash the application at runtime. ter finishing you code, give the complete code of AppDemo in the space below. swer

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!