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.
|
Use a
Or use Apache Commons Lang
Or use Java8's
|
|||||
|
My recommendation would be to use org.apache.commons.lang.StringUtils:
|
|||||||||
|