inheret -> inherit
This commit is contained in:
parent
c113522d5e
commit
52f899a1af
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ coffeeMachine.#waterLimit = 1000; // Error
|
||||||
coffeeMachine.waterAmount = 100; // Works
|
coffeeMachine.waterAmount = 100; // Works
|
||||||
```
|
```
|
||||||
|
|
||||||
On the language level, `#` is a special sign that the field is private. We can't access it from outside or from inhereting classes.
|
On the language level, `#` is a special sign that the field is private. We can't access it from outside or from inheriting classes.
|
||||||
|
|
||||||
Private fields do not conflict with public ones. We can have both private `#waterAmount` and public `waterAmount` fields at the same time.
|
Private fields do not conflict with public ones. We can have both private `#waterAmount` and public `waterAmount` fields at the same time.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue