Sun Certified Java Developer Question:
Download Job Interview Questions and Answers PDF
Explain Given:
1. package test;
2.
3. class Target {
4. public String name = "hello";
5. }
What can directly access and change the value of the variable name?
A. any class
B. only the Target class
C. any class in the test package
D. any class that extends Target
Answer:
C:any class in the test package
Download Sun Certification Interview Questions And Answers
PDF