Skip to content

Commit e1cecf5

Browse files
authored
Update CH07.md
edit typo
1 parent 32261c9 commit e1cecf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/CH07.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public class SafeArrayDemo {
388388

389389
public Account(String number, double money) {
390390
accountNumber = number; // 實際等於this.accountNumber = number;
391-
this.balance = money; // 實際等於this.balance = money;
391+
balance = money; // 實際等於this.balance = money;
392392
}
393393

394394
this 除了用來參考至呼叫方法的實際物件之外,還有一種可以帶引數的用法,主要是用於呼叫建構方法,而避免直接以建構方法的名稱來呼叫,例如在下面的程式片段中,當使用無參數的建構方法 Ball() 時,它會呼叫有參數的建構方法:

0 commit comments

Comments
 (0)