I'm currently reading through Apple's "Intro to App Development with Swift" student guide. At the end-quiz of chapter 9, "Types", it asks:
When you're reading code and aren't sure of the type of a variable or constant, what's the quickest way to find out?
The answer is:
Rewrite the section of code using different encapsulation.
However, the concept of encapsulation has not been introduced before so I'm rather confused. In the e-book's Glossary, it states:
A language mechanism for restricting access to some of the object components and/or a language construct that facilitates the bundling of data with the methods of operating on that data.
Can anyone explain how this relates to finding out about the type of a variable or constant?
Thanks in advance.