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 / ram

any class in the test package

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of web technologies?

528


When arithmeticexception is thrown?

583


What is the list interface in java programming?

582


What are the legal operands of the instanceof operator?

566


What is the dot operator?

572






What is the use of set in java?

612


How do you remove an object from an arraylist in java?

467


What is the method to expand and collapse nodes in a jtree?

612


Can a class extend 2 classes in java?

558


Differentiate between == and equals().

598


What is difference between arraylist and list in java?

585


what is difference between equals and ==?

590


Explain the importance of thread scheduler in java?

600


Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

638


What are inner classes or non static nested classes in java?

707