Question: Please answer the following 3 questions Using the following definitions of the Measurable and Named interfaces. public interface Measurable { double get Measure(); } public
Please answer the following 3 questions
Using the following definitions of the Measurable and Named interfaces. public interface Measurable { double get Measure(); } public interface Named { double getName (); } Assume BankAccount provides the code for the getMeasure () and getName () methods. Which of the following could correctly represent the class header for Bank Account? public class BankAccount extends Measurable implements Named public class BankAccount implements Measurable, Named public interface BankAccount implements Measurable, Named public class BankAccount extends Measurable, Named Which of the following is true about interface types and abstract classes? An interface type cannot be instantiated whereas an abstract class can. An interface type cannot have instance variables whereas an abstract class can. An abstract class can provide method implementation whereas an interface type cannot. An interface type cannot have constants whereas an abstract class can. Which of the following are not allowed in a Java 8 interface declaration? instance variables default methods static methods constants
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
