what i've done wrong? I cant understand. Help me please.
package com.codegym.task.task07.task0708;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/*
Longest string
*/
public class Solution {
private static List<String> strings = new ArrayList<>();
public static void main(String[] args) throws Exception {
//write your code here
int max = 0;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
for (int i = 0; i < 5; i++) {
strings.add(reader.readLine());
max = strings.get(0).length();
if (strings.get(i).length() > max) {
max = strings.get(i).length();
}
}
for (String s : strings) {
if (s.length() == max) {
System.out.println(s);
}
}
}
}