mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 14:18:20 +08:00 
			
		
		
		
	Merge branch 'master' of github.com:krahets/hello-algo
This commit is contained in:
		@ -114,6 +114,16 @@ comments: true
 | 
			
		||||
    bool[] booleans = new bool[5];
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
=== "Swift"
 | 
			
		||||
 | 
			
		||||
    ```swift title=""
 | 
			
		||||
    // 使用多种「基本数据类型」来初始化「数组」
 | 
			
		||||
    let numbers = Array(repeating: Int(), count: 5)
 | 
			
		||||
    let decimals = Array(repeating: Double(), count: 5)
 | 
			
		||||
    let characters = Array(repeating: Character("a"), count: 5)
 | 
			
		||||
    let booleans = Array(repeating: Bool(), count: 5)
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
## 计算机内存
 | 
			
		||||
 | 
			
		||||
在计算机中,内存和硬盘是两种主要的存储硬件设备。「硬盘」主要用于长期存储数据,容量较大(通常可达到 TB 级别)、速度较慢。「内存」用于运行程序时暂存数据,速度更快,但容量较小(通常为 GB 级别)。
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user