diff --git a/kotlin.md b/kotlin.md index 2a4822f..5de2ee3 100644 --- a/kotlin.md +++ b/kotlin.md @@ -14,7 +14,7 @@ */ ``` -#### Declaración e inicialización de variables +#### Variables Se debe usar siempre la inferencia de tipos, aunque se pueda asignar el tipo de variable. La inicialización aquí es obligatoria. @@ -26,4 +26,10 @@ var nombreVariable: Float|Double 1.1[F] var nombreVariable: Boolean = true var nombreVariable: Char = 'a' var nombreVariable: String = "qwerty" +``` + +#### Constantes + +```kotlin +val nombreConstante[:tipo] = valor ``` \ No newline at end of file