List to String injava15 code example
Example 1: java list of strings to string
String string = list.stream().map(Object::toString).collect(Collectors.joining(""));
Example 2: convert list of strings to string
string Something = string.Join(",", MyList);
Example 3: 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());