Skip to content

Update 01_Hello world.md #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 3 additions & 4 deletions examples/01_introduction/01_Hello world.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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. 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.

1. O código Kotlin geralmente é definido em pacotes. A especificação do pacote é opcional: se você não especificar um pacote em um arquivo fonte, seu conteúdo será direcionado para o pacote padrão.
2. O ponto de entrada de uma aplicação Kotlin é a função main. Você pode declará-la sem parâmetros. O tipo de retorno não é especificado, o que significa que a função não retorna nada.
3. println escreve uma linha na saída padrão. Ela é importada implicitamente. Além disso, vale notar que os ponto e vírgula no final das linhas de código são opcionais.