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 / dilip
any class
| Is This Answer Correct ? | 4 Yes | 9 No |
Post New Answer View All Answers
What are the two environment variables that must be set in order to run any java programs?
Is it possible to override the main method?
What is Hierarchy of exception?
What is difference between fail-fast and fail-safe?
Why do you canvas?
How many functional interfaces does java 8 have?
Can an interface extend a class?
What is java algorithm?
What is collection class in java? List down its methods and interfaces.
Write a program to solve producer consumer problem in java?
Differentiate between vector and array list.
Why main() method is public, static and void in java ?
What do you understand by the term polymorphism?
Which data type is class in java?
Does java support multiple inheritances?