java - Convert string array to strings with a whitespace separating them -


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

Popular posts from this blog

angularjs - Showing an empty as first option in select tag -

qt - Change color of QGraphicsView rubber band -

php - Cloud9 cloud IDE and CakePHP -