Because comparaison method have to be done based on type int (x==y) or class Integer (x.equals(y)) with right operator
public class Example {
public static void main(String[] args) {
int[] arr = {-32735, -32735, -32700, -32645, -32645, -32560, -32560};
for(int j=1; j<arr.length-1; j++)
if((arr[j-1]!=arr[j]) && (arr[j]!=arr[j+1]))
System.out.println("int>"+arr[j]);
Integer[] I_arr = {-32735, -32735, -32700, -32645, -32645, -32560, -32560};
for(int j=1; j<I_arr.length-1; j++)
if((!I_arr[j-1].equals(I_arr[j])) && (!I_arr[j].equals(I_arr[j+1])))
System.out.println("Interger>"+I_arr[j]);
}
}