Kotlin Functions

Kotlin Infix Function Call

In this article, you will learn about infix notation to call a function in Kotlin with the help of examples. Kotlin supports function calls of a special kind, called infix calls. In Kotlin, functions marked with infix keyword can also be called using infix notation means calling without using parenthesis and dot. Before you learn …

Kotlin Infix Function CallRead More »

Kotlin Default and Named Arguments

In this article, you will learn about default and named arguments with the help of examples. Kotlin Default Argument In Kotlin, you can provide default values to parameters in the function definition and the parameter with a default value is called default argument. There are three cases for default arguments: Case I: All arguments passed …

Kotlin Default and Named ArgumentsRead More »

Kotlin Functions

In this article, you’ll learn about Kotlin functions, how to define a function and use them in your program with the help of examples. Functions A Kotlin function is a collection of statements that are grouped together to perform an operation. Functions allow us to reuse the code without retyping the code i.e. you can write …

Kotlin FunctionsRead More »

%d bloggers like this: