Test your knowledge
- You use the
static var
keywords to declare a:- Type property.
- Instance property.
- Read-only computed instance property.
- You use the
static let
keywords to declare a:- Mutable type property.
- Immutable instance property.
- Immutable type property.
- An instance-stored property:
- Has its own independent value for each instance of a class.
- Has the same value for all the instances of a class.
- Has the same value for all the instances of a class, unless it is accessed through the class name followed by a dot and the property name.
- A class that exposes mutable properties will:
- Generate immutable instances.
- Generate mutable instances.
- Generate mutable classes but immutable instances.
- An instance method:
- Cannot access instance properties.
- Can access instance ...
Get Swift 3 ObjectOriented Programming - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.