- Hands-On Design Patterns with Swift
- Florent Vilmart Giordano Scalzo Sergio De Simone
- 70字
- 2021-07-02 14:45:10
Arrays
Unlike in Objective-C, a Swift array can only hold elements of the same type, and it's a value type.
The following code declares an Array container of three Int types, 1, 2, and 3:
let ints = [1,2,3] // Array<Int> or [Int]
As an example, if you wanted them to be Doubles, you could easily force the type on it:
let doubles: [Double] = [1,2,3]
推薦閱讀
- 大數據可視化
- 使用GitOps實現Kubernetes的持續部署:模式、流程及工具
- Modern Programming: Object Oriented Programming and Best Practices
- Architects of Intelligence
- 數據庫應用基礎教程(Visual FoxPro 9.0)
- 深入淺出MySQL:數據庫開發、優化與管理維護(第2版)
- 大數據Hadoop 3.X分布式處理實戰
- Hadoop集群與安全
- 信息融合中估計算法的性能評估
- 數據挖掘與機器學習-WEKA應用技術與實踐(第二版)
- 掌中寶:電腦綜合應用技巧
- 數據庫原理及應用實驗:基于GaussDB的實現方法
- 產品經理數據修煉30問
- 大數據架構師指南
- Computer Programming for Absolute Beginners