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


Use of private variable while creating properties ???



Use of private variable while creating properties ???..

Answer / m4n07

I am newbie in J2EE & looking for strong basic behind each
concept as,
Why do we use private access specifier before each variable of
type property bcoz ultimately to access it outside the class
we use public method as getter & setter ?

If we use getter & setter to access it outside the class so
better we make variable as public so that it is easily
available outside of the class...

Please guide me why do we use as private ????

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More J2EE Interview Questions

What is java actionlistener?

0 Answers  


What is 2 stands for in j2ee?

0 Answers  


What is full form of j2ee?

0 Answers  


Which edition of java is used for developing web application?

0 Answers  


What is repaint in java?

0 Answers  


How will you explain cdata?

0 Answers  


What is j2ee application?

0 Answers  


Is downloading java safe?

0 Answers  


What does application client module contain?

0 Answers  


There are 2 classes . Class A and Class B. In Class A i declared a variable in private. if we can access this private variable in Class B. If yes means , how we can access ?

7 Answers   HCL, Itx Centrics, Virtusa,


How do I become a java developer?

0 Answers  


What is wildfly java?

0 Answers  


Categories