title: Finding if an array contains all elements in another array
body: <p>I am trying to loop through 2 arrays, the outer array is longer then the other. It will loop through the first and if the 2nd array does not contain that int it will return a false. But I cannot figure out how to go about this. This is what I have so far:</p>
  
  <pre><code>public boolean linearIn(int[] outer, int[] inner) {
    for (int i = 0; i &lt; outer.length; i++) {
      if (!inner.contains(outer[i])) {
        return false;
      }
    }
  
    return true;
  }
  </code></pre>
  
  <p>I am getting this error when run:</p>
  
  <pre><code>Cannot invoke contains(int) on the array type int[]
  </code></pre>
  
  <p>I am wondering if it can be done without using a nested loop (like above). I know I'm doing something wrong and if anyone could help on the matter it would be great. Also I wasn't sure what class to look for in the java doc for the <code>int[]</code>.</p>