What it means "The program should add lines to the beginnig of the list"? I don´t understand it.
package com.codegym.task.task07.task0710;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
To the top of the list
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
ArrayList<String> list = new ArrayList<String>();
// Populating the array
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int i;
for(i=0; i<10; i++){
list.add(i, reader.readLine());
}
// Displaying the content of the array
i=list.size()-1;
do{
System.out.println(list.get(i));
i--;
}while(i>=0);
}
}