This question already has an answer here:
- Create ArrayList from array 13 answers
I have a array
File [] temp=null;
And I have a arrayList of File
type
List <File> tempList = new ArrayList <File>();
Now I want to add the content from temp
to tempList
. So anyone can please tell me How do I this?
temp
array and add each File to thetempList
– MaVRoSCy May 8 '13 at 10:05ArrayList
using a for loop will give you a warning in Android Studio that says it prefers you use theArrayList
'saddAll()
method. You could still do it, but for some reason Android Studio doesn't prefer it (maybe it's more efficient to use the method?) – Noni A. Apr 27 at 1:07