Recursive Binary Search Java Project

New here and although I am not new to Java, I am far from proficient. I would appreciate simple answers that don't make me feel like a bottom feeder. I appreciate all your help. I have written a program that takes in two arrays of objects with data from files that were read in. My job is to write a recursive binary search method that compares the two arrays for similar ID #s. I have everything written; however, I am either missing a component, calling the method incorrectly or there is much larger issue deep in my code. When I call my binary search method in the driver, it only searches ONE array for the ID value passed into the method parameter list. It needs to compare the two arrays, not just find what was entered.

This is just a portion of my class file showing where I wrote the compareTo method as well as the binary search method.

/**
 * Sort array by ID
 * 
 * @param compareArray
 * @return 
 */
@Override
public int compareTo(ArrayItem compareArray) {

    int compareID = ((ArrayItem) compareArray).getID();

    //ascending order
    return this.ID - compareID;
}

/**
 * Binary search method
 * 
 * @param arr
 * @param l
 * @param r
 * @param ID
 * @return 
 */
public int binarySearchID(ArrayItem[] arr, int l, int r, int ID) {
    if (r >= l) {
        int mid = l + (r - l) / 2;

        // If the element is present at the  
        // middle itself 
        if (arr[mid].getID() == ID) {
            return mid;
        }

        // If element is smaller than mid, then  
        // it can only be present in left subarray 
        if (arr[mid].getID() > ID) {
            return binarySearchID(arr, l, mid - 1, ID);
        }

        // Else the element can only be present 
        // in right subarray 
        return binarySearchID(arr, mid + 1, r, ID);
    }

    // We reach here when element is not present 
    //  in array 
    return -1;
}

Then this is the driver

public class Driver {

public static void main(String[] args) throws IOException {

    ArrayItem[] searchItem;
    ArrayItem[] mainItem;
    String color;
    int ID;
    int data = 0;
    int data2 = 0;

    /**
     * Read in file 1
     */

    File dataFile1 = new File("Lab2InputFile1.txt");
    Scanner scan1 = new Scanner(dataFile1);

    while (scan1.hasNextLine()) // open the file
    {
        scan1.nextLine();
        data++;
    }

    mainItem = new ArrayItem[data];
    scan1 = new Scanner(dataFile1);

    for (int i = 0; i < mainItem.length; i++) {
        color = scan1.next();
        ID = scan1.nextInt();
        ArrayItem mainObjects = new ArrayItem(color, ID);
        mainItem[i] = mainObjects;

    }

    Arrays.sort(mainItem);

    for (int i = 0; i < mainItem.length; i++) {
        System.out.println(" Sorted Data Set 1 " + mainItem[i]);
    }

    System.out.println("\n");

    /**
     *  Read in file 2
     */

    File dataFile2 = new File("Lab2InputFile2.txt");
    Scanner scan2 = new Scanner(dataFile2);

    while (scan2.hasNextLine()) // open the file
    {
        scan2.nextLine();
        data2++;
    }

    searchItem = new ArrayItem[data2];
    scan2 = new Scanner(dataFile2);

    for (int i = 0; i < searchItem.length; i++) {
        color = scan2.next();
        ID = scan2.nextInt();
        ArrayItem searchObjects = new ArrayItem(color, ID);
        searchItem[i] = searchObjects;

    }

    Arrays.sort(searchItem);

    for (int i = 0; i < searchItem.length; i++) {
        System.out.println(" Sorted Data Set 2 " + searchItem[i]);
    }

    /**
     * Run binary search
     */

    System.out.println("\n");

    System.out.println(" Is the element from Data Set 2 present in Data Set 1? ");


        ArrayItem biID = new ArrayItem();
        int n = mainItem.length;
        int result = biID.binarySearchID(mainItem, 0, n - 1, 17);
        if (result == -1) {
            System.out.println("No, the element not present");
        } else {
            System.out.println("Yes, that element is located at index of "
                    + result);
        }

    System.out.println("\n");

}