Java Interfaces in Java Interfaces in Java Interfaces Quiz

please I need help on the interface in Java

Fill in the blank to create an Array that can contain both Wine and Cheese:

public class Main { public static void main(String[] args) { Wine wine = new Wine(); Cheese cheese = new Cheese(); --Object[ ]--- foods = {wine, cheese}; } }

class Wine implements Drinkable, Delicious { //omitted }

class Cheese extends Dairy implements Delicious { // omitted }

1 Answer

Fill in the blank to create an Array that can contain both Wine and Cheese:

public class Main { public static void main(String[] args) { Wine wine = new Wine(); Cheese cheese = new Cheese(); --Object[ ]--- foods = {wine, cheese}; } }

class Wine implements Drinkable, Delicious { //omitted }

class Cheese extends Dairy implements Delicious { // omitted }