1ArrayList<String> al = new ArrayList<String>();
2 al.add("Hello");
3 al.add("Wor");
4 al.add("ld");
5 StringBuffer sb = new StringBuffer();
6
7 for (String s : al) {
8 sb.append(s);
9 sb.append(" ");
10 }
11 String str = sb.toString();
12 System.out.println(str);//"Hello wor ld"