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

why i can not access private variable in other class?

Answer Posted / srihari

private variables are visible within the class they are
defined but not in the other classes present in same package
& classes in different packages. Hence, we call "private"
variables as "CLASS-LEVEL" instances.

private variables are used when we do not want the variable
declared in a class to be shared or used by other classes
present in same packages or different packages.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain different way of using thread?

957


What is a java proxy?

900


Is lambda functional programming?

820


What is the difference between jar and executable jar?

939


How do I run a project in netbeans?

859


Do I need both jdk and jre?

956


Which instutute is offering course for rhino jain slee

2231


In java thread programming, which method is a must implementation for all threads?

943


What are tlds in java?

829


What is @override annotation in java?

905


What is java language expression?

858


What is the locale class?

894


Which is more secure: java or activex? : java security

891


How do javabeans work?

827


What are the benefits of a jar file?

974