Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _tour/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ println(point1.x) // prints 1
In this version of the `Point` class, `x` and `y` have the default value `0` so no arguments are required. However, because the constructor reads arguments left to right, if you just wanted to pass in a `y` value, you would need to name the parameter.
```
class Point(var x: Int = 0, var y: Int = 0)
val point2 = new Point(y=2)
val point2 = new Point(y = 2)
println(point2.y) // prints 2
```

Expand Down