Created
April 11, 2024 09:37
-
-
Save jagedn/1d88d125462111bc40f70d8b66687bdb to your computer and use it in GitHub Desktop.
definir cadenas simples
This file contains hidden or 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
// igual que en java | |
String holaJava = "caracola"; | |
// como en java pero sin punto y coma | |
String holaGroovy1 = "caracola" | |
// usando comillas simples | |
String holaGroovy2 = 'caracola' | |
// sin definir el tipo | |
def holaGroovy3 = "caracola" | |
// a lo java moderno | |
var holaGroovy4 = "caracola" | |
println holaJava | |
println holaGroovy1 | |
println holaGroovy2 | |
println holaGroovy3 | |
println holaGroovy4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment