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


Please Help Members By Posting Answers For Below Questions

What is constructor in java ?

636


What is a priority queue java?

528


What is map in java?

520


What is your platform’s default character encoding?

559


What is the difference between processes and threads?

536






How does arraylist work in java?

534


Why is it important to initialize a variable?

491


What is a locale?

696


What are the important methods of java exception class?

574


What is java oops?

558


What is a method signature java?

575


Which is the best approach for creating thread ?

727


How would you format a date in java? I.e. In the ddmmyyy format?

778


What is void data type?

580


What is the difference between length and length () in java?

527