What's my code wrong?
Output is nothing!
Thanks a lot!
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 {
ArrayList<String> list = new ArrayList<String>(10);
BufferedReader r = new BufferedReader ( new InputStreamReader(System.in));
for ( int i =0; i< list.size(); i++) {
String a= r.readLine();
list.add(a);
}
int b; int c;
for (int i=0; i<list.size()-1; i++) {
b= list.get(i).length();
c=list.get(i+1).length();
if ( b>c)
System.out.println(i+1);
break;
}//write your code here
}
}