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 / lakshman
any class that extends Taget
| Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
what do you mean by java annotations?
Explain about static imports in java?
What is ellipsis in java?
What is variable in java?
What are the types of sockets in java?
Can you instantiate the math class?
Is intellij better than eclipse?
What is object cloning in Java?
How do you use compareto?
Explain covariant method overriding in java.
What is singleton math?
What is the tradeoff between using an unordered array versus an ordered array?
Can private class be extended java?
How many ways can we create the string object?
Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.