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 the use of static methods?
How do you remove an element from an arraylist in java?
What are methods in java?
what is difference between equals and ==?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
Why arraylist is not synchronized in java example?
What do you mean by chromounits in java8?
Differentiate between run time error and syntax error.
How do you sort arrays in java?
What is set and get methods in java?
Lowest Common ancestor in a Binary Search Tree and Binary Tree.
How to sort an array from smallest to largest java?
Can you explain the private protected field modifier?
How would you convert bytes to string?
Tell me the latest versions in java related areas?