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 is singleton class in java?
Whats the difference between notify() and notifyall()?
What is formatted output in java?
What is the base class of all exception classes in java?
Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?
What is an example of a boolean?
Why hashcode is used in java?
What is function and method in java?
can I implement my own start() method? : Java thread
Does java isempty check for null?
Why do we need singleton?
What are class types in java?
What is an accessor?
What are the advantages of packages in java?
What is the difference between preemptive scheduling and time slicing in java programming?