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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between session bean and entity bean ?

905


What is single tier architecture in java?

897


What is java awt event?

876


Why java is not 100% object oriented language?

967


How do I run java?

853


to update a batch in a table in jdbc which method of statement object is used

2074


What do you understand by j2ee?

932


What is client-certificate authentication?

1004


What is initialization parameter?

1042


What is the difference between java and core java?

938


What is a j2ee module?

900


Why is java called technology?

874


What is create method?

1005


What is platform independent in java?

937


Which is latest technology in java?

935