Mam problem z ostatnim punktem.
nie potrafię znaleść rozwiązania
package pl.codegym.task.task07.task0718;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Sprawdzanie kolejności
*/
public class Solution {
public static void main(String[] args) throws IOException {
//tutaj wpisz swój kod
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> lista = new ArrayList<String>();
for(int i = 0; i < 10; i++)
{
lista.add(reader.readLine());
}
//int ros = lista.get(0).length();
for(int i = 0; i < lista.size(); i++)
{
if(lista.get(i).length() > lista.get(i+1).length())
{
//ros = lista.get(i).length();
System.out.println(lista.get(i));
break;
}
//else if(lista.get(i).length() > lista.get(i+1).length())
//{
// System.out.println(lista.get(i));
// break;
//}
}
}
}