I want to write a program that would display my command-line arguments in the console one after another. I found in oracle tutorials that you can surround passed arguments with "" to put them in one line, but how can I do the same with code?
I made something like this but cant keep space between two arguments.
public class Printargs {
public static void main(String[] args) {
for(String s: args){
System.out.print((' ' + s).trim());
}
}
}