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

What is difference between map and flatmap in java 8?

803


Who developed rxjava?

817


What is interceptors in java?

828


What is the difference between a jdk and a jvm?

852


What is proxy object in java?

1040


Which is best framework in java?

873


What is use of jpa?

805


Why dependency injection is used in java?

968


What are the Advantages of java se 8 new features?

910


What is a container in java?

835


What type of parameter passing does java support?

793


How do I start netbeans?

955


What is class forname java?

849


What is data encapsulation?

926


What is a stream in programming?

795