turn an element in list to string java code example
Example 1: list of string to string array in java
list.toArray(new String[0]);
Example 2: List into string java
ArrayList<String> list = new ArrayList<String>();
list.add("one");
list.add("two");
list.add("three");
StringBuilder sb = new StringBuilder();
for (String s : list)
{
sb.append(s);
sb.append("\t");
}
System.out.println(sb.toString());