Intersection of Array Question, limited only to methods Problem: Find the intersection of two Object arrays without creating any new classes (no anonymous classes either) and without using any native Java classes in the solution (so no ArrayList  implementations etc., but Object can be used)

My solution:

public Object[] handleArrayIntersection(Object[] array1, Object[] array2) {
    if(array1.length == 0 || array2.length == 0){
        return new Object[0];
    }
    // the maximum possible number of intersections is the smaller array's size
    int maxPossibleLength = array1.length &lt; array2.length ? array1.length : array2.length;
    Object[] intersectionValues = new Object[maxPossibleLength];
    int itemCount = 0;
    for(int i = 0; i &lt; array1.length; i++){
        Object arr1Val = array1[i];
        if(contains(array2, arr1Val) &amp;&amp; !contains(intersectionValues, arr1Val)){
            intersectionValues[itemCount] = arr1Val;
            itemCount++;
        }
    }

    // reduce the array down to only contain the intersections
    Object[] intersection = new Object[itemCount];
    for(int i = 0; i &lt; itemCount; i++){
        intersection[i] = intersectionValues[i];
    }
    return intersection;
}


public boolean contains(Object[] newArr, Object arr1Val) {
        boolean contains = false;
        for(int i = 0; i &lt; newArr.length; i++){
            Object val = newArr[i];
            if((val == null &amp;&amp; arr1Val == null) || (val != null &amp;&amp; val.equals(arr1Val))){
                contains = true;
                break;
            }
        }
        return contains;
}


I haven't tried to solve this type of problem for awhile and I am really curious what people  think of this solution in terms of efficiency, robustness and readability. I arrived at this solution by using TDD (Test Driven Development), but I'm not including the test because I'm more interested in people reviewing the solution.
If you want to optimize you can : Use arrayCopy() from the System Class to create the final array and reduce variable. Here is my "solution" : 

public static Object[] handleArrayIntersection(Object[] array1, Object[] array2) {
    Object[] dest;

    int itemCount = 0;
    Object[] intersect = new Object[array1.length &lt; array2.length ? array1.length : array2.length];

    for(int i = 0; i &lt; array1.length; i++) {
        Object arr1Val = array1[i];
        if(contains(array2, arr1Val) &amp;&amp; !contains(intersect, arr1Val)) {
            intersect[itemCount++] = arr1Val;
        }
    }

    dest = new Object[itemCount];
    if(itemCount &gt; 0) {
        System.arraycopy(intersect, 0, dest, 0, itemCount);
    }

    return dest;
}