Question: For observing changes to a property, which of these two statements cause the related method to be called and why?
- Statement 2, since it calls the auto-created setter on the property.
- Statement 1, since it uses the property directly.
- Statement 2, since it specifies the class instance to use.
- Statement 1, since it calls the auto-created setter on the property.
Answer: The correct answer of the above question is Option A:Statement 2, since it calls the auto-created setter on the property.