- 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.
推薦閱讀
- 同步:秩序如何從混沌中涌現(xiàn)
- Hands-On Data Structures and Algorithms with Rust
- 云計(jì)算環(huán)境下的信息資源集成與服務(wù)
- Developing Mobile Games with Moai SDK
- 3D計(jì)算機(jī)視覺:原理、算法及應(yīng)用
- Learn Unity ML-Agents:Fundamentals of Unity Machine Learning
- 軟件成本度量國家標(biāo)準(zhǔn)實(shí)施指南:理論、方法與實(shí)踐
- 數(shù)字媒體交互設(shè)計(jì)(初級(jí)):Web產(chǎn)品交互設(shè)計(jì)方法與案例
- 企業(yè)級(jí)數(shù)據(jù)與AI項(xiàng)目成功之道
- 網(wǎng)站數(shù)據(jù)庫技術(shù)
- ZeroMQ
- MATLAB Graphics and Data Visualization Cookbook
- LabVIEW 完全自學(xué)手冊(cè)
- 探索新型智庫發(fā)展之路:藍(lán)迪國際智庫報(bào)告·2015(下冊(cè))
- 大數(shù)據(jù)數(shù)學(xué)基礎(chǔ)(Python語言描述)