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

What is the use of Getters and Setters method ?

Answer Posted / marshallsudhan

Before get into the answer, we gotta know something
prior...! "JavaBeans".
JavaBeans are java classes that have properties. For our
purpose, think of properties as private instance variables.
since they're private, the only way they can be accessed
from outside of their class is through 'methods'in the
class.
The methods that change a propertiy's value are called
setter methods, and the methods that retrieve a property's
value are called getter methods.

Is This Answer Correct ?    54 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What about method local inner classes or local inner classes in java?

1005


What is boolean flag in java?

1034


Which package is used for pattern matching with regular expressions?

1055


What are the 4 types of research methods?

873


Highest level event class of the event-delegation model?

3952


What does jenkins do?

864


What is the difference between an array and an array list?

956


What do you mean by boolean?

1014


Explain about member inner classes?

1026


What means public static?

995


What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

1038


How would you format a date in java? I.e. In the ddmmyyy format?

1316


What is the purpose of a volatile variable?

975


What is the maximum size of array in java?

926


Why is multithreading important?

889