Hi all,
I am a beginner in java and would like to know how to convert List<Set<String>> to an array, so that the output would be without brackets and commas. I have the following part of code:
List<Set<String>> ls = new ArrayList();
for (int i = 0; i < ls.size(); i++) {
System.out.println(ls.get(i));
}
output:
[x, y, z]
[c, e]
I tried with toArray(), but I'm getting an ArrayStoringException error.
Can anyone give some hints?
Thanks.