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
Is main an identifier?
What does arrays sort do in java?
why are there separate wait and sleep methods? : Java thread
What is ternary operator in java?
What is tochararray in java?
What is generic type?
Explain OOPs concept.
Which is fastest collection in java?
What is the size of an array?
What is the purpose of javac exe?
How many threads can I run java?
Can a class extend more than one class?
How to reverse a string in java?
What is hashtable and explain features of hashtable?
Name some OOPS Concepts in Java?