JAVA Programming :: Objects and Classes - Discussion
Home > JAVA Programming > Objects and Classes > MCQs Questions Discussion
5 / 30
To make a variable defined in a class accessible only to methods defined in the classes in same package, which of the following keyword should be used. Select the one correct answer.
ABy using the keyword private before the variable.
BBy using the keyword protected before the variable.
CBy using the keyword public before the variable.
DThe variable should not be preceded by any of the above mentioned keywords.
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!