Help please
package de.codegym.task.task07.task0712;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Kürzeste oder längste
*/
public class Solution {
public static void main(String[] args) throws Exception {
//schreib hier deinen Code
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> list = new ArrayList<String>();
for(int i = 0; i < 10; i++){
list.add(br.readLine());
}
int klein = Integer.MAX_VALUE, kleinNr = 0;
int gross = Integer.MIN_VALUE, grossNr = 0;
for(int i = 0; i < 10; i++){
String person = list.get(i);
int laenge = person.length();
if(laenge < klein){
klein = laenge;
kleinNr = i;
}
else if(laenge > gross){
gross = laenge;
grossNr = i;
}
}
if(kleinNr < grossNr){
System.out.println(list.get(kleinNr));
}
else{
System.out.println(list.get(grossNr));
}
}
}