Solved

Consider the Definition of the Measurable Interface and the Code

Question 68

Multiple Choice

Consider the definition of the Measurable interface and the code snippet defining the Inventory class: Consider the definition of the Measurable interface and the code snippet defining the Inventory class:   The compiler complains that the getMeasure method has a weaker access level than the Measurable interface.Why?  A) The getMeasure method was declared as private in the Measurable interface. B) The variable onHandCount was not declared with public access. C) All of the methods in a class have a default access level of package access, while the methods of an interface have a default access level of private. D) All of the methods in a class have a default access level of package access, while the methods of an interface have a default access level of public. The compiler complains that the getMeasure method has a weaker access level than the Measurable interface.Why?


A) The getMeasure method was declared as private in the Measurable interface.
B) The variable onHandCount was not declared with public access.
C) All of the methods in a class have a default access level of package access, while the methods of an interface have a default access level of private.
D) All of the methods in a class have a default access level of package access, while the methods of an interface have a default access level of public.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions