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 the difference between a threads start() and run() methods? : Java thread
Which keyword specify that a variable is effectively final ?
Can we have 2 main methods in java class?
How do you compare characters in java?
what r advatages of websphere? & how to deploy?
How to handle a web browser resize operation?
What do you understand by synchronization?
What is the difference between class & object?
Is array primitive data type in java?
Difference between process and thread?
What modifiers may be used with an inner class that is a member of an outer class in java programming?
What if constructor is protected in java?
Is array dynamic in java?
What are the differences between path and classpath variables?
What types of index data structures can you have in java?