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 are Hostile Applets?

2150


What does escaping a character mean?

1092


What is java and their uses?

1088


What mechanism does java use for memory management?

1020


In Java list the methods that can be overridden?

1055


What does this () mean in java?

1031


What are different data types?

1083


How do you use parseint in java?

1030


If an application has multiple classes in it, is it okay to have a main method in more than one class?

1063


What is the vector class in java programming?

1142


What is native code?

1204


Are arrays dynamic in java?

1086


What are void methods?

1062


Write a program to print 15 random numbers using foreach of java 8?

982


Can we have any code between try and finally blocks?

1073