Oracle
1Z0-851 · Question #191
Given: package test; class Target { public String name = "hello"; } What can directly access and change the value of the variable name?
The correct answer is C. any class in the test package. See the full explanation below for the reasoning.
Question
Given: package test; class Target { public String name = "hello"; } What can directly access and change the value of the variable name?
Exhibit
Options
- Aany class
- Bonly the Target class
- Cany class in the test package
- Dany class that extends Target
How the community answered
(27 responses)- A11% (3)
- B4% (1)
- C81% (22)
- D4% (1)
Community Discussion
No community discussion yet for this question.
