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...

How to access a variable if it is declared as private?

Answer Posted / neo

You can access the private variable in to the other package
or other classes by inheritance . to inherite the super
classes all the resources comes in to sub classes private
also in this context.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is main string [] args?

1044


What is the definition of tree ?

1126


What is the argument in java?

987


What is finalize method?

1196


What is garbage collection? What is the process that is responsible for doing that in java?

1156


What is regex in java?

991


What does the “final” keyword mean in front of a variable? A method? A class?

1035


What happens when a thrown exception is not handled?

1197


What is a treemap in java?

1064


What does yield method of the thread class do?

1081


Can you explain the final method modifier?

1059


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

1051


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

1378


What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?

1094


Can a class be private in java?

1039