I can't find the problem.
Please help
Thanks
package com.codegym.task.task07.task0718;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Checking the order
*/
public class Solution {
public static void main(String[] args) throws IOException {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> list = new ArrayList<String>();
for(int a = 0; a < 10; a++){
list.add(reader.readLine());
}
int length = list.get(0).length();
for(int b = 1; b < list.size(); b++){
int length1 = list.get(b).length();
if(length1 <= length){
System.out.println(list.get(b));
break;
}
}
}
}