Код выполняется норм, результат true, но компилятор не засчитывает второе требование таски...
package com.javarush.task.pro.task05.task0519;
import java.util.Arrays;
/*
Есть ли кто?
*/
public class Solution {
public static int[] array = {9, 8, 7, 6, 5, 4, 3, 2, 1};
public static int element = 5;
public static void main(String[] args) {
int[] x = Arrays.copyOf(array, 9);
Arrays.sort(x);
int index = Arrays.binarySearch(x, element);
if (index > 0 && index < array.length){
System.out.println(true);
}
}
}