title: Concatenate string in Java arraylist
body: <p>This code gives me an output of -</p>
  
  <p>first_name- [Tiger, Enrique]</p>
  
  <p>family_name- [Woods, Iglesias]</p>
  
  <pre><code>import java.util.*;
  
  public class al_Concatenate {
  public static void main(String args[]) {
  
    // creating array list
    ArrayList&lt;String&gt; first_name  = new ArrayList&lt;String&gt;();
    ArrayList&lt;String&gt; family_name = new ArrayList&lt;String&gt;();
    Arraylist&lt;String&gt; name        = new Arraylist&lt;String&gt;(); 
    // add elements to the array list
    first_name.add("Tiger");
    first_name.add("Enrique");
    family_name.add("Woods");
    family_name.add("Iglesias");
  
    name.??
  
    //displaying the output
    System.out.println("first_name- " + first_name);
    System.out.println("family_name- "+ family_name);
    System.out.println("name- "+  name);
     }
  }
  </code></pre>
  
  <p>But I need and output like this <strong>(without using loop, preferably a single line code)</strong>-</p>
  
  <p>name - [Tiger Woods, Enrique Iglesias]</p>
  
  <p>thanks in advance</p>
  
  <p>I would also like to add that the size of the arraylist is 2, but in my real program it's around 4500. I created this example to make it simple :)
  I edited the post a bit, sorry for making it cumbersome :(</p>