Skip to content
Open
Show file tree
Hide file tree
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 Classes/Smart casts/task.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Smart casts

Rewrite the following Java code using [smart casts](https://kotlinlang.org/docs/typecasts.html#smart-casts)
and the [when](https://kotlinlang.org/docs/control-flow.html#when-expression) expression:
and the [when](https://kotlinlang.org/docs/control-flow.html#when-expressions-and-statements) expression:

```java
public int eval(Expr expr) {
Expand Down
2 changes: 1 addition & 1 deletion Introduction/Default arguments/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public String foo(String name) {

You can replace all these Java overloads with one function in Kotlin.
Change the declaration of the `foo` function in a way that makes the code using `foo` compile.
Use [default and named](https://kotlinlang.org/docs/functions.html#default-arguments) arguments.
Use [Parameters with default values](https://kotlinlang.org/docs/functions.html#parameters-with-default-values).
4 changes: 2 additions & 2 deletions Introduction/Named arguments/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Make the function `joinOptions()` return the list in a JSON format (for example, `[a, b, c]`)
by specifying only two arguments.

[Default and named](https://kotlinlang.org/docs/functions.html#default-arguments)
arguments help to minimize the number of overloads and improve the readability of the function invocation.
[Named arguments](https://kotlinlang.org/docs/functions.html#named-arguments) and [Parameters with default values](https://kotlinlang.org/docs/functions.html#parameters-with-default-values)
help to minimize the number of overloads and improve the readability of the function invocation.
The library function [`joinToString`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/join-to-string.html)
is declared with default values for parameters:

Expand Down