Not clear why Verify failing validation. Please advise.
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>();
int smallStrLength = 0;
for (int i=0; i<10;i++){
list.add(reader.readLine());
}
smallStrLength = list.get(0).length();
for(String str:list){
if (str.length() < smallStrLength ){
System.out.println(list.indexOf(str));
return;
}
}
}
}