I have a situation in which I want to convert a List<String>
to a single String
and with commas
PS : I'm using RootTools library for command and I wanna execute a
Busybox --list command
I have a situation in which I want to convert a List<String>
to a single String
and with commas
PS : I'm using RootTools library for command and I wanna execute a
Busybox --list command
Just iterate over your list and add elements as they come to a String. This is one way of doing it but there are others.
List<String> myList ;
String result = "";
//...
for (String tmp : myList) {
result += tmp+","
}