I have the following code:
ArrayList<String> idattributes=new ArrayList();
idattributes.add("7");
idattributes.add("10");
idattributes.add("12");
I'm trying to convert it to a string like this:
String listString = "";
for (String s : idattributes) {
listString += s + "\t";
}
System.out.println(listString);
I get: "7 10 12 "
How could I remove those multiple spaces? I just want a string "7 10 12" Any other good way to convert idattributes to a String? Thanks