wraping list to string java code example
Example: wraping list to string java
public static void main(String[] args) {
try {
List list =
Arrays.asList('c', 's', 'v');
StringBuilder sb = new StringBuilder();
for (Character chr : list) {
sb.append(chr);
}
// convert to string
String result = sb.toString();
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}
}
Output:
csv