It compiles, shows the right index and everything, but CodeGym won't approve it. Am I a joke to you? :(
lol where did I messed up?
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 {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> l = new ArrayList<String>();
int index = 0;
for (int i = 0; i<10; i++){
l.add(r.readLine());
}
for (int i = 0; i<l.size(); i++){
if (l.get(i).length()>l.get(i+1).length()){
index = i;
break;
}
}
if (index != 0){
System.out.println(index);
}
}
}