java - Convert string array to strings with a whitespace separating them -
this question has answer here:
i have string array (not arraylist), best way print new string whitespace separating them, lets say
string array = {"a", "b", "c"};
i want print "a b c", how can that?
you can use code string whitespace.
string[] array = {"a", "b", "c"}; string output = ""; (int = 0; < array.length; i++) { output += array[i] + " "; }
Comments
Post a Comment