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 / ram
any class in the test package
| Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
What are the various access specifiers for java classes?
Explain the purpose of garbage collection in Java?
What are kinds of processors?
Write code of any action class?
How to check if linked list contains loop in java?
What are the 5 types of research methods?
Tell some latest versions in JAVA related areas?
How many techniques can be employed to create a string object?
Explain the access modifiers for a class, method and variables?
What are the different http methods?
What is a finally block? Is there a case when finally will not execute?
What is data string?
How big is a boolean?
What is use of map in java?
Difference between this() and super() in java ?