Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is a parameter in java?

950


Java is pass by value or pass by reference? Explain

933


What kind of variables can a class consist?

996


Can we compare two strings in java?

956


Do I need java on my computer?

921


Why method overriding is used?

1019


Does java map allow duplicates?

839


How do you insert a line break?

854


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

965


Which is better singleton or static class?

919


How many ways can an argument be passed to a subroutine and explain them?

962


Is set ordered?

920


Is treeset sorted in java?

933


How do you sort a string in java?

902


What is a generic data type?

961