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 "this" keyword in java? Explain
Explain the differences between abstraction and encapsulation?
Is list ordered in java?
What are parameters in a method?
What is a finally block?
Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?
What are the problems faced by java programmers who don't use layout managers?
What is a wrapper method?
How do you bind variables?
What is passing value java?
What is constructor chaining and how is it achieved in java?
What do you understand by access specifiers in Java?
How will you compute size of a structure?
What is the difference between throw and throws in java?
Why hashmap is used in java?