Skip to content

Commit

Permalink
update: remove Kotlin 1.3 references
Browse files Browse the repository at this point in the history
Mentioning 1.3 seems less than useful at this point.
  • Loading branch information
zamulla authored Mar 25, 2024
2 parents 0e614d4 + a5f7ebd commit 51c6ca8
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions examples/01_introduction/01_Hello world.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ fun main() { // 2
```

1. Kotlin code is usually defined in packages. Package specification is optional: If you don't specify a package in a source file, its content goes to the default package.
2. An entry point to a Kotlin application is the `main` function. Since Kotlin 1.3, you can declare `main` without any parameters. The return type is not specified, which means that the function returns nothing.
3. `println` writes a line to the standard output. It is imported implicitly. Also note that semicolons are optional.

In Kotlin versions earlier than 1.3, the `main` function must have a parameter of type `Array<String>`.

```run-kotlin
fun main(args: Array<String>) {
println("Hello, World!")
}
```
2. An entry point to a Kotlin application is the `main` function. You can declare it without any parameters. The return type is not specified, which means that the function returns nothing.
3. `println` writes a line to the standard output. It is imported implicitly. Also, note that semicolons at the end of code lines are optional.

0 comments on commit 51c6ca8

Please sign in to comment.