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 protected in java?
What do you understand by looping in java? Explain the different types of loops.
What is array size in java?
What is fundamental datatype?
Is set ordered in java?
Why is it called boolean?
What isan abstract class and when do you use it?
What is the difference between a loader and a compiler?
What is the static method?
Which containers use a flowlayout as their default layout in java programming?
What does it mean that a class or member is final?
Why we used break and continue statement in java?
Can singleton class be serialized?
Which are the two subclasses under exception class?
What is difference between static class and singleton pattern?