Can anyone take a look at my solution?
package com.codegym.task.task08.task0812;
import java.io.*;
import java.util.ArrayList;
/*
Longest sequence
*/
public class Solution {
public static void main(String[] args) throws IOException {
ArrayList<Integer> list = new ArrayList<Integer>();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
for (int i = 0; i < 10; i++) {
list.add(Integer.parseInt(reader.readLine()));
}
int longestSeq = 1;
int currSeq = 1;
for (int currInt = 0; currInt < 10; currInt++) {
for (int nextInt = currInt+1; nextInt < 10; nextInt++) {
if (list.get(currInt) == list.get(nextInt)) {
currSeq++;
}
}
if (currSeq > longestSeq) {
longestSeq = currSeq;
}
currSeq = 1;
}
System.out.println(longestSeq);
}
}