Created
July 30, 2011 21:21
-
-
Save sourcerebels/1116015 to your computer and use it in GitHub Desktop.
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
class TestArrayAsVarArgs { | |
static saludar(def numero, String[] nombres) { | |
println "Numero " + numero | |
for (nombre in nombres) { | |
println "Hola " + nombre | |
} | |
} | |
static main(args) { | |
saludar(3, "nombre1", "nombre2", "nombre3") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment