Wednesday, February 1, 2012

How to insert the array in arrayList collection?


//Below is to store array in ArrayList variable

String [] filenames=getFilesFromDirectory(selectedFolderName);
for (String s : filenames) {
imageList.add(s);
}

//You can reverse the arrayList with following method
Collections.reverse(imageList);

No comments:

Post a Comment