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 / manikandan [ gtec,vellore ]

Public is Visible to everywhere.
Private is visible to only the same class.
Protected is visible in same package and also sub classes in
any package.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between static class and normal class?

1185


What is the static variable?

1183


How do I enable java in safari?

1097


What is the meaning of variables in research?

1074


what state does a thread enter when it terminates its processing? : Java thread

1123


Is minecraft java edition free?

1170


What are accessor methods in java?

1058


Can we have return statement in finally clause? What will happen?

1012


What is procedure writing?

1061


Can java object be locked down for exclusive use by a given thread?

1061


What is java util hashmap?

1035


Where to store local variables?

1157


What are the advantages of java?

1036


Explain the concept of hashtables?

1223


What are the different approaches to implement a function to generate a random number?

1103