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?
1 any class
2 only the Target class
3 any class in the test package
4 any class that extends Target
Answer Posted / dilip
any class
| Is This Answer Correct ? | 4 Yes | 9 No |
Post New Answer View All Answers
What is an immutable class?
Explain about abstract classes in java?
What is join () in java?
What is flag in java?
What are new features introduced with java 8 ?
Why we used vector class?
Is arraylist sorted in java?
Why is whitespace important?
what is encapsulation in java? Explain
What are passing parameters?
What is externalizable?
Explain tree set and its features?
What are the advantages of autoboxing?
What is static data type in java?
Explain polymorphism citing an example.