Advertisements
Advertisements
Question
The method which changes the state of an object is known as:
Options
Pure method
Impure method
Replace method
None of the above
MCQ
Solution
Impure method
Explanation:
An impure method alters the state of an object or has side effects, such as changing the object's fields.
shaalaa.com
Is there an error in this question or solution?