All, I need help with this task. Could anyone give me a hint? 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 {
//ArrayList Declaration
ArrayList<String> funList = new ArrayList<>();
// Getting user inputs
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// Building the list
for (int i = 0 ; i < 10; i++){
String line = reader.readLine();
funList.add(line);
}
// Check the order of the list
for(int i = 0; i < 10; i++){
for(int j = i + 1 ; j < 10; j++){
if (funList.get(i).length() > funList.get(j).length()){
System.out.println(funList.get(j));
break;
}
}
break;
}
}
}