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 boolean flag in java?
What is the difference between scrollbar and scrollpane?
What is unicode used for?
What are the characteristics of Final,Finally and Finalize keywords.
How do you sort arrays in java?
Is class is a data type?
Why isn’t there operator overloading?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What is the use of a copy constructor?
Can you achieve runtime polymorphism by data members?
Is java call by value?
What are bind parameters?
If I don't provide any arguments on the command line, then what will the value stored in the string array passed into the main() method, empty or null?
What is the use of parse function in java?
What is the difference between math floor and math round?