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 difference between this and super keyword?

1046


Explain the difference between treeset and treemap in java?

1053


Is arraylist ordered?

1126


What is the difference between class forname and new?

1050


What is serialversionuid?

1159


How we can execute any code even before main method?

1189


Does java isempty check for null?

1040


What’s the difference between callable and runnable?

1186


If try block is successfully executed, Then Is Finally block executed?

1128


How do you clear a method in java?

1050


What do you know about the garbage collector?

1158


What is java dot?

1009


Difference between collection, collection and collections in java?

1061


What are unchecked exceptions in java?

1085


What does split function do in java?

1082