Solved

Consider the Following Code Snippet: Public Class Inventory Implements Measurable

Question 68

Multiple Choice

Consider the following code snippet: public class Inventory implements Measurable
{
) . .
Public double getMeasure() ;
{
Return onHandCount;
}
}
Why is it necessary to declare getMeasure as public ?


A) All methods in a class are not public by default.
B) All methods in an interface are private by default.
C) It is necessary only to allow other classes to use this method.
D) It is not necessary to declare this method as public.

Correct Answer:

verifed

Verified

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

Related Questions