Answers for "List into string java"

5

java list of strings to string

String string = list.stream().map(Object::toString).collect(Collectors.joining(""));
Posted by: Guest on August-21-2020
-1

list of string to string array in java

list.toArray(new String[0]);
Posted by: Guest on March-16-2021
0

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());
Posted by: Guest on May-05-2021

Code answers related to "List into string java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language