0

function that returns a string of paramaeters passed to it on Java

I want to write a function that returns a string of paramaeters passed to it and if no parameters passed return “no parameters passed “

6th Nov 2021, 11:03 AM
Rine
3 Respostas
+ 1
Just go through java courses https://www.sololearn.com/learning/2152/
6th Nov 2021, 11:04 AM
Sâñtôsh
Sâñtôsh - avatar
0
I tried but i do no where is the problem public class Program { public static void main(String...args) { return args.length==0 ?"no parameters passed ": String.join("," args ); } }
6th Nov 2021, 11:08 AM
Rine