Dlaczego to dziala ? a jak tam dam
lista.get(i) == lista.get(i-1)
to juz nie wczytuje liczb pow 127 ?
ArrayList<Integer> lista = new ArrayList<>();
for (int i = 0; i < 10; i++){
lista.add(Integer.parseInt(reader.readLine()));
}
int n = 1;
ArrayList<Integer> tab = new ArrayList<>();
for (int i = 1; i < lista.size(); i++){
if (lista.get(i).equals(lista.get(i-1))){
n++;
}else{
n = 1;
}
tab.add(n);
}
System.out.println(Collections.max(tab));