Solved

Consider the Following Code Snippet: Public Class Inventory Implements Measurable

Question 85

Multiple Choice

Consider the following code snippet: public class Inventory implements Measurable
{
) . .
Double getMeasure() ;
{
Return onHandCount;
}
}
The compiler complains that the getMeasure method has a weaker access level than the Measurable interface. Why?


A) 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.
B) 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.
C) The variable onHandCount was not declared with public access.
D) The getMeasure method was declared as private in the Measurable interface.

Correct Answer:

verifed

Verified

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

Related Questions