Question: Given that Short and Integer extend Number directly, what type can be used to fill in the blank in the following class to allow it

Given that Short and Integer extend Number directly, what type can be used to fill in the blank in the following class to allow it to compile? 

package band; interface Horn { public Integer play(); } abstract class Woodwind

A. Object

B. Integer

C. Short

D. Number

E. None of the above

package band; interface Horn { public Integer play(); } abstract class Woodwind { public Short play() { return 3; } } } public final class Saxophone extends Woodwind implements Horn { public play() { return null; }

Step by Step Solution

3.26 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

In the given Java program you have an interface Horn with a method play that ... View full answer

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 Oracle Questions!