0
Giving arrays as parameters
How can i give to my program a set of parameters as array public class Program { public static join(String...args) { return args.length==0 ?"no parameters passed ": String.join("," args ); } }
2 odpowiedzi
+ 5
I have put some code below that may be helpful
https://code.sololearn.com/cK31e4GUFF9g/?ref=app
+ 3
Here an example for unknown number of args:
https://code.sololearn.com/cKI3TIvwylsV/?ref=app