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 is wrapper class html?

914


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

1223


What is constructor and its types?

1126


Why should I use abstract class?

1075


Can we define private and protected modifiers for variables in interfaces?

1057


What is difference between jdk,jre and jvm?

1102


What are the fileinputstream and fileoutputstream?

1038


What is arraylist e?

1056


What is the similarity between dynamic binding and linking?

1102


What is floor in java?

1023


What is string subsequence method?

1104


How do you get the length of a string in java?

975


What are heap memory and stack memory and what are memory tables.

963


Do you know how to reverse string in java?

1128


Differentiate between vector and array list.

1042