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 types of web technologies?
When arithmeticexception is thrown?
What is the list interface in java programming?
What are the legal operands of the instanceof operator?
What is the dot operator?
What is the use of set in java?
How do you remove an object from an arraylist in java?
What is the method to expand and collapse nodes in a jtree?
Can a class extend 2 classes in java?
Differentiate between == and equals().
What is difference between arraylist and list in java?
what is difference between equals and ==?
Explain the importance of thread scheduler in java?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What are inner classes or non static nested classes in java?