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..
String[] a = {"Java", "is", "cool"};
Output: Java is cool.
feedback
|
Use a
Or use Apache Commons Lang
| |||||
feedback
|
My recommendation would be to use org.apache.commons.lang.StringUtils:
| |||
feedback
|