Return an int[] after storing in a LinkedList
<p>When I try and return my int[] it says it's an object and I cannot return it to int[].</p>

<pre><code>public class CostMatrix {

LinkedList matrix = new LinkedList&lt;int[]&gt;();

CostMatrix() {
}

void addToMatrix(int[] toAdd) {
    matrix.add(toAdd);
}

int[] returnCost(int pos){

    return matrix.get(pos)
}
</code></pre>

<p>}</p>
