Which compiles?
A. new Animal().soundOff();
B. Elephant e = new Alpha1();
C. Lion 1 = Alpha.get(“meat eater”);
D. new Alpha1().get(“veggie”).soundOff();
Answer:D
Which compiles?
A. new Animal().soundOff(); B. Elephant e = new Alpha1(); C. Lion 1 = Alpha.get(“meat eater”); D. new Alpha1().get(“veggie”).soundOff();