title: how to create a string from string array or arraylist?
body: <p>how can i extract all the elements in a string [] or arraylist and combine all the words with proper formating(with a single space) between them and store in a array..</p>
  
  <pre><code>String[] a = {"Java", "is", "cool"};
  </code></pre>
  
  <p>Output: Java is cool.</p>