Here is the information I have
63974241
63974241
63974241
68936124
68936124
74513945
74513945
76343943
76343943
76343943
85028969
85028969
91809014
109367944
109367944
109367944
I would like to remove those triplicates but keep singletons and duplicates. Therefore, the expect output should be as below,
68936124
68936124
74513945
74513945
85028969
85028969
91809014
Here are the script I have now :
for (int row = 0; row < row_number; row++) {
if (array[row].equals(array[row+1]) && array[row+1].equals(array[row+2]) ) {
}
else if (array[row].equals(array[row+1]) && array[row-1].equals(array[row]) ) {
}
else if (array[row].equals(array[row-1]) && array[row-1].equals(array[row-2]) ) {
}
else{
System.out.println(array[row+1]);
}
}
I will be grateful if any help from here.