-
Notifications
You must be signed in to change notification settings - Fork 22
Literals in kotlin
Devrath edited this page Feb 1, 2024
·
1 revision
Kotlin literal means a constant value assigned to a variable
val x = 10 // Integer literal
val y = 13.8 // Double literal
val z = "Hello" // String literal
- When we assign a function to a variable, It becomes a function literal
- There are 2 types of function literal
- Lamda Expression
- Anonymous function