Question: B is an interface that contains some method c(), and Ais a class that implements B. Identify ALL of the following that might be true.

 B is an interface that contains some method c(), and Ais

a class that implements B. Identify ALL of the following that might

B is an interface that contains some method c(), and Ais a class that implements B. Identify ALL of the following that might be true. an A object can be assigned to a B type a B object can be assigned to an A type The code for class A can include concrete code for c0 if c() is identified as "default", A must override If cl) is abstract, A must override. Consider this pseudo-code: class Animal; // constructor sets name class Wolf extends Animal; // constructor sets name via call to parent // Note: there is a howl() method in the Wolf class, but not in the Animal class Wolf wolf1 = new Wolf("Brandon"); Animal animal1 = new Wolf("Holly"); Animal animal2 = new Animal("Gabe"); ArrayList zoo = new ArrayList(); zoo.add(wolf1); zoo.add(animal1); zoo.add(animal2); for (Animal animal : 200) { animal.howl(); } Which of the following is true? Only Brandon will howl; then we will get a runtime error. Brandon, Holly and Gabe will all howl, and there will be no runtime errors. The code will not compile, so we will never know who will howl. Nobody will howl; we will get a runtime error. Brandon and Holly will howl; then we will get a runtime error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!