Which answer fails to compile?

Given the following class declarations: public abstract class Animal public interface Hunter public class Cat extends Animal implements Hunter public class Tiger extends Cat
Which answer fails to compile?

A. Option A
B. Option B
C. Option C
D. Option D
E. Option E

Download Printable PDF. VALID exam to help you PASS.

3 thoughts on “Which answer fails to compile?

  1. Answer D:

    As per the classes definitions, the Tiger is a Cat, but the Cat is not a Tiger. So we cannot add Cat classes to Tiger array list. Vice versa works though.

Leave a Reply

Your email address will not be published. Required fields are marked *

The reCAPTCHA verification period has expired. Please reload the page.