ArrayList

Oi galera… tenho um problema pra percorrer um ArrayList pegar o valor dele e acresentar em uma String chamada caminho é +/- assim.

if ( (files != null) || (!files.isEmpty()) ){
UploadFile file = (UploadFile)files.get(“uploadfile”);
upBean.store(mrequest,“uploadfile”);
caminho=file.getFileName();
aux.add(caminho);
}
depois tenho que percorrer meu ArrayList aux pasando todos seus valores para umaString caminho. Como posso fazer isso!

Não entendir muito bem sua pergunta, mas para percorrer uma ArrayList

for(int i = 0;i<myArray.size();i++){
str += (String) myArray.get(i);
}

ou java 5
ArrayList <String> lista = ArrayList<String>();

for(String nstr: lista){
str += nstr;
}

ou então através de um Iterator:

Iterator it = myArray.iterator&#40;&#41;; while &#40; it.hasNext&#40;&#41; &#41;&#123; str += &#40;String&#41; it.next&#40;&#41;; &#125;

[]'s