Question 3
Consider the code given below
class Animal{ public void legs(){ System.out.println("Number of legs are not known"); } public void wings(){ System.out.println("Wings may exist"); }}class Dog extends Animal{ public void legs(){ System.out.println("Four legs"); }}class Ostrich extends Animal{ public void legs(){ System.out.println("Two legs"); } public void wings(){ System.out.println("Two wings"); }}public class Test{ static void show(Animal[] a){ for(int i = 0; i < a.length; i++){ a[i].legs(); a[i].wings(); } } public static void main(String[] args){ Animal[] a = {new Dog(), new Ostrich()}; // LINE 1 show(a); }}Choose the correct option.