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 / adarsh gowda

Getter and setter methods are used to retrieve and manipulate private variables in a different class. A "getter" method does as it name suggest, retrieves a the attribute of the same name. A setter method allows you to set the value of the attribute.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an error in java?

1091


Is there a sort function in java?

919


What is an eror in java?

988


What is the difference amongst jvm spec, jvm implementation, jvm runtime ?

911


What are the different approaches to implement a function to generate a random number?

996


Why is inheritance used in java?

1057


State some situations where exceptions may arise in java?

1000


What is method reference in java?

1051


What is the reflection?

943


What are loops in java?

1156


What is your platform?s default character encoding and how to know this?

2319


Which is a valid identifier?

1098


How to reverse string in java?

1131


How does arrays sort work in java?

956


What is the use of coding?

910