hey i'm unable to remove error from this code , So if theres anyone online please help me....
package com.codegym.task.task07.task0722;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.*;
/*
The end
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> list = new ArrayList<String>();
String a = reader.readLine();
while(true)
{
if(a .equals("end"))
break;
else
list.add(a);
}
Iterator itr = list.iterator();
while(itr.hasNext())
{
System.out.println(itr.next());
}
}
}