From 32974ed3a34acd8456f60222b25453f74daa413c Mon Sep 17 00:00:00 2001 From: TheLittleBoy Date: Sat, 28 Jun 2014 11:56:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BC=96=E5=86=99=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码中少写了一个双引号 --- source/chapter2/14_Initialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/14_Initialization.md b/source/chapter2/14_Initialization.md index a6575b39..b4f82a46 100755 --- a/source/chapter2/14_Initialization.md +++ b/source/chapter2/14_Initialization.md @@ -158,7 +158,7 @@ class SurveyQuestion { let cheeseQuestion = SurveyQuestion(text: "Do you like cheese?") cheeseQuestion.ask() // 输出 "Do you like cheese?" -cheeseQuestion.response = "Yes, I do like cheese. +cheeseQuestion.response = "Yes, I do like cheese." ``` 调查问题在问题提出之后,我们才能得到回答。所以我们将属性回答`response`声明为`String?`类型,或者说是可选字符串类型`optional String`。当`SurveyQuestion`实例化时,它将自动赋值为空`nil`,表明暂时还不存在此字符串。