int[] z = array;
Arrays.sort(z);
int x = (Arrays.binarySearch(z, element));
System.out.println(x > 0);