Variadic function: Difference between revisions

m
(Fix missing code line in the second Lang example)
Line 1,031:
 
<syntaxhighlight lang="java">
module VariadicFunction {
void show(String[] strings) {
{
void show(String[] strings)
{
@Inject Console console;
strings.forEach(s -> console.print(s));
}
 
void run() {
{
show(["hello", "world"]);
 
Line 1,048 ⟶ 1,045:
String s4 = "literal";
show([s1, s2, s3, s4]);
}
}
}
</syntaxhighlight>
 
162

edits