- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 84字
- 2021-07-02 23:54:28
Inheritance
A class can inherit methods, properties, and other characteristics from another class:
class SomeSubClass: SomeSuperClass
Swift classes do not inherit from a universal base class. Classes that we define without specifying a superclass automatically become base classes for us to build on. To override a characteristic that would otherwise be inherited, we prefix our overriding definition with the override keyword. An overridden method, property, or subscript can call the superclass version by calling super. To prevent overrides, the final keyword can be used.
推薦閱讀
- Hands-On Data Structures and Algorithms with Rust
- 云數據中心基礎
- Java Data Science Cookbook
- 云計算與大數據應用
- R數據科學實戰:工具詳解與案例分析(鮮讀版)
- Lean Mobile App Development
- Scratch 3.0 藝術進階
- 數據挖掘原理與SPSS Clementine應用寶典
- 企業級數據與AI項目成功之道
- 信息學競賽寶典:數據結構基礎
- IPython Interactive Computing and Visualization Cookbook(Second Edition)
- Solaris操作系統原理實驗教程
- 數字IC設計入門(微課視頻版)
- openGauss數據庫核心技術
- Hands-On Deep Learning for Games