When passing in an argument using the cmd console, such as "java Hello Shook Ones" how would you get the output to contain spaces in between the args?
Here is some of my code:
if(args.length <= 0) System.out.print("Hello World"); else if (args.length > 0) { System.out.print("Hello "); for (int i = 0; i < args.length; i++) System.out.print(args[i]); }
What would I add to my for loop to have the output appear as "Hello Shook Ones" instead of " Hello ShookOnes."?
Thanks in advance.