The compiler says there's an error on line 22. I've tried multiple variations of that line but none of them would work. Also, does the rest of my code look okay?
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));
//write your code here
ArrayList<String> list = new ArrayList<>();
String s = "end";
for (int i = 0; i < list.size(); i++){
if (list.get(i)=s)
break;
System.out.println(list);
}
}
}