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
What is an error in java?
Is there a sort function in java?
What is an eror in java?
What is the difference amongst jvm spec, jvm implementation, jvm runtime ?
What are the different approaches to implement a function to generate a random number?
Why is inheritance used in java?
State some situations where exceptions may arise in java?
What is method reference in java?
What is the reflection?
What are loops in java?
What is your platform?s default character encoding and how to know this?
Which is a valid identifier?
How to reverse string in java?
How does arrays sort work in java?
What is the use of coding?