Solved

Consider the Following Code Snippet: Public Class Inventory Implements Measurable

Question 8

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents