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 another word for methodology?
Write code to implement bubble sort in java?
What is the properties class in java programming?
What is the difference between hashset and treeset in java?
Why is stringbuffer thread safe?
Explain an intermediate language?
For class CFoo { }; what default methods will the compiler generate for you>?
How do you reverse a string in java?
What is the console in java?
What is the purpose of file class?
How do you read and print a string in java?
What is purpose of keyword void?
What is runtime locatable code?
What is an 8 bit word?
Can we have 2 main methods in java class?