I prefer it
List<String> temp = Arrays.asList(speciesArr); species.addAll(temp);
The reason is that the Arrays.asList () method will create a fixed-size list. Therefore, if you directly store it in a view, then you cannot add any element, but it is not readable. You can, of course, edit your subjects. Therefore, translate it into a temporary list.
The alternative for this is
Collections.addAll(species, speciesArr);
In this case, you can add, edit, delete your items.
Ravi A 12 Oct. '12 at 7:11 2012-10-12 07:11
source share