How wait in a loop to execute a task ? Android : 

    for(int i=0; i < size; i++){
        loadImageFromServer(i);
    }


The `loadImageFromServer();` takes sometime to load image from server . Now I want the loop to wait for that time and then excited . How to do that ?