whats wrong
package com.codegym.task.task07.task0722;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
The end
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> strings = new ArrayList<String>();
while(true){
if(reader.readLine().contains("end"))
break;
strings.add(reader.readLine());
}
for(int j=0;j<strings.size();j++)
System.out.println(strings.get(j)); // just because i was forced to use for loops here
}
}