I have checked the following stackoverflow source to solve my problem:
but, when applying the top solution, I still get an error, as follows:
My list is defined here:
List linhaInicial = new ArrayList();
My convertion is made here:
String[] convertido = linhaInicial.toArray(new String[linhaInicial.size()]);
The problem is I still get the following error:
Error:(86, 59) java: incompatible types
required: java.lang.String[]
found: java.lang.Object[]
My conversion is somehow still returning Object[]
when it should now be returning String[]
.
Any solutions?
Thanks!