/**Binary Search*/ import java.util.*; public class Binarysearch { public static void main(String [] args) { Scanner input = new Scanner(System.in); final int SIZE = 30; System.out.println("Enter the Number Of elements you want to enter "); int n = input.nextInt(); System.out.printf("Enter %d elements \n",n); int i=0,j=0; int [] arr = new int [SIZE]; for(i=0;i<n;i++) { arr[i]=input.nextInt(); } //sor...
This Blog is a place to find all Basic Java Programs. If You can improve the code, please post it in comment.