java uses unchecked or unsafe operations recompile with xlint error?
<p>I'm getting a message that says I have unchecked and unsafe operations when I try to compile this binary search program. I looked at other posts on stackoverflow, but I couldn't figure out how to fix my code. Thanks!</p>

<pre><code>public binarySearch()
{
    ArrayList&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();
    for (int i=0;i&lt;10;i++)
    {
        int rand = (int)(Math.random()*10);
        list.add(rand);
        System.out.print(list.get(i)+"\t");
        if ((i+1)%10==0) System.out.println();
    }   
    System.out.println("\n"+search(sort(list),0));
}

public ArrayList sort(ArrayList&lt;Integer&gt; listNum)
{
    for (int i=0;i&lt;listNum.size()-1;i++)
    {
        int min=10000;
        int index=0;
        for (int j=i;j&lt;listNum.size();j++)
            if (listNum.get(j)&lt;min) 
            {
                min=listNum.get(j);
                index=j;
            }
        int temp = listNum.get(i);
        listNum.set(i,listNum.get(index));
        listNum.set(index,temp);
    }
    return listNum;
}   

public boolean search(ArrayList&lt;Integer&gt; listNum, int num)
{
    //need to sort list
    int low = 0;
    int high = listNum.size()-1;
    while (low&lt;=high)
    {
        int mid = (low+high)/2;
        int midValue = listNum.get(mid);
        if (num&lt;midValue)
            high = mid-1;
        if (num&gt;midValue)
            low = mid+1;
        if (num==midValue)
            return true;
    }
    return false;
}

public static void main (String args[])
{
    binarySearch app = new binarySearch();
}
</code></pre>
