Kotlin TutorialLesson 4Free preview
Kotlin Syntax
This lesson is part of Kotlin · All levels
Summary
This lesson unpacks the basic syntax structure of Kotlin. In Kotlin, the play function can be written without parameters and does not require class wrapping at the outermost level. This makes the syntax of the beginner program very clean, straight to the core of the problem, and easy to read.
Key points
- The keyword 'fun' is used to declare a function
- The main() function is the starting point of the application and does not require a declaration of the packing class
- The instruction block is written in curly braces '{' and '}'
- The writing of the semicolon (;) is optional at the end of the instruction line
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.