BinarySearch.java - public class BinarySearch public static void main(String args TODO Auto-generated method stub Integer list = new Integer[10 for(int

BinarySearch.java - public class BinarySearch public static...

This preview shows page 1 out of 1 page.

public class BinarySearch { public static void main(String[] args) { // TODO Auto-generated method stub Integer[] list = new Integer[10]; for (int i = 0; i < list.length; i++) { list[i] = i; } // Test binarySearch for (int i = 0; i < list.length + 4; i++) { System.out.println("Max = " + binarySearch(list, i)); } } public static <E extends Comparable<E>> int binarySearch(E[] list, E
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Spring '19
  • Dr. Jing Zhang
  • Assembly Language, Subroutine, Return statement, Void type, public static void, public class BinarySearch

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture