Created
October 10, 2023 09:11
-
-
Save rodobarcaaa/323e68b8f6581c45236dad77c9a4063a to your computer and use it in GitHub Desktop.
Scala Hello World Var
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object HelloWorldVar extends App { | |
// Declaramos una variable mutable vacía de tipo String | |
var value: String = "" | |
// Le asignamos un valor | |
value = "mundo" | |
// Imprimimos el valor y acá podemos ver como usar string interpolation | |
println(s"¡Hola, $value!") //¡Hola, mundo! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment