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

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

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

php - Cloud9 cloud IDE and CakePHP -