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 is constructor in java ?
What is a priority queue java?
What is map in java?
What is your platform’s default character encoding?
What is the difference between processes and threads?
How does arraylist work in java?
Why is it important to initialize a variable?
What is a locale?
What are the important methods of java exception class?
What is java oops?
What is a method signature java?
Which is the best approach for creating thread ?
How would you format a date in java? I.e. In the ddmmyyy format?
What is void data type?
What is the difference between length and length () in java?