Kotlin TutorialLesson 19Free preview
Kotlin Functions
This lesson is part of Kotlin · All levels
Summary
This lesson reviews the making and naming of custom functions in Kotlin. Kotlin supports modern features such as parameters with default values, named arguments, and single-expression functions. These features reduce the need to overload many functions.
Key points
- Function defined by the keyword 'fun'
- Support for default parameters
- Named arguments allow for the naming of arguments by explicitly naming their parameters
- Single-expression functions can be written briefly directly using the equals sign '='
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.