ΠΡΠ΅ ΠΆΠ΅ ΠΏΠΎ ΡΡΠ»ΠΎΠ²ΠΈΡΠΌ, ΠΠ°Π»ΠΈΠ΄Π°ΡΠΎΡ Π½Π΅ ΠΏΡΠΎΠΏΡΡΠΊΠ°Π΅Ρ!
ΠΠ΅ ΡΡΠ½ΠΎ Π² ΡΠ΅ΠΌ Π΄Π΅Π»ΠΎ
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.binarySearch(array,element);
boolean b = x >=0;
System.out.println(b);
}
}
