A class within a package must be declared public if
A) It will be used only by other classes in the same package.
B) It will be used by classes that are not in the same package.
C) It is in the same directory as the other classes in the package.
D) It has a unique name.
Correct Answer:
Verified
Q21: Which syntax imports all static members of
Q22: By default,the classpath consists only of the
Q24: The import declaration import java.util.*;is known as
Q24: When no access modifier is specified for
Q25: A final field should also be declared
Q26: A package is:
A)A directory structure used to
Q28: The import declaration import *;_.
A)causes a compilation
Q29: The classpath consists of a list of
Q30: Instance variables declared final do not or
Q31: When compiling a class in a package,the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents