Test your knowledge
- When you use the
static var
keywords to declare a type property:- You cannot override the type property in the subclasses.
- You can override the type property in the subclasses.
- You can override the type property only in the superclass.
- When you use the
class var
keywords to declare a type property:- You cannot override the type property in the subclasses.
- You can override the type property in the subclasses.
- You can override the type property only in the superclass.
- When you use the
final
keyword to declare an instance method:- You cannot override the instance method in the subclasses.
- You can override the instance method in the subclasses.
- You can override the instance method only once, that is, in just one subclass.
- Polymorphism means: ...
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.