@@ -0,0 +1,597 @@
+import java.util.Arrays;%0A%0Apublic class ArrayDemo %7B%0A %0A   public static void main(String%5B%5D args) %7B%0A%0A   // initializing unsorted int array%0A   int intArr%5B%5D = %7B30,20,5,12,55%7D;%0A%0A   // sorting array%0A   Arrays.sort(intArr);%0A%0A   // let us print all the elements available in list%0A   System.out.println(%22The sorted int array is:%22);%0A   for (int number : intArr) %7B%0A   System.out.println(%22Number = %22 + number);%0A   %7D%0A%0A   // entering the value to be searched%0A   int searchVal = 12;%0A%0A   int retVal = Arrays.binarySearch(intArr,searchVal);%0A%09%0A   System.out.println(%22The index of element 12 is : %22 + retVal);%0A   %7D%0A%7D%0A

Create binarysearch.java