Sail E0 Webinar
Question
A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction?
Options:
A .  Declare the method with the keyword protected.
B .  Declare the method with the keyword public.
C .  Declare the method with the keyword public and private.
D .  Declare the method with the keyword private.
E .  Do not declare the method with any accessibility modifiers.
Answer: Option E

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers