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 / kumar
By default,the package and class are public.the result will
be 4 any class that extends Target.
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is the symbol for average?
Why do we need wrapper class?
How do you find the maximum number from an array without comparing and sorting?
Is special character in java?
What is general methodology?
How do you join strings in java?
Why webdriver is an interface?
What is toarray method in java?
What does replaceall do in java?
Which browsers work with java?
What is difference between array and vector?
What is use of arraylist in java?
What does the append?
How do I get the | symbol on my keyboard?
What is compiler and what its output.