Question: java Assume that the following snippet of code compiles. Dessert[] yummy = new Dessert (4); yummy [0] = new Cookie (); Cake c = new
![= new Dessert (4); yummy [0] = new Cookie (); Cake c](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f518d33ef25_70666f518d2ce3ae.jpg)
Assume that the following snippet of code compiles. Dessert[] yummy = new Dessert (4); yummy [0] = new Cookie (); Cake c = new Cake (); yummy[1] = c; c = new Cookie(); yummy [2] = C; yummy [3] new IceCream(); for (Food f : yummy) System.out.println( ((cookie) f).is Delicious()); = Which of the following statements must be true? Select all correct answers. a) Cookie is a subclass of Cake b) The class Food contains a method called is Delicious() c) Dessert is an abstract class Which of the following statements must be true? Select all correct ans a) Cookie is a subclass of Cake b) The class Food contains a method called is Delicious() c) Dessert is an abstract class d) There are 3 objects of type Cookie in the array yummy e) Dessert is a subtype of Food
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
