I'm not able to pass 3rd requirement.. should add lines to the beginning of the list .. what does it mean ?
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
InputStreamReader r = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(r);
ArrayList<String> list = new ArrayList<String>();
for(int i=0; i<10; i++)
{
list.add(br.readLine());
}
for(int i=list.size()-1; i>=0; i--)
{
System.out.println(list.get(i));
}
}
}