title: Stumped: Detect identical sequence of integers in two integer arrays
body: <p>First and foremost, I'm a java newb. I've been searching for a concise approach to this problem that doesn't involve lists or hash tables, but haven't found it yet:</p>
  
  <p>**Note this is not a homework assignment, BUT it is Exercise #14 in Chapter 7 of "Building Java Programs"</p>
  
  <p>Write a method called contains that accepts two arrays of integers as parameters and returns a boolean indication whether or not the elements of the second array appear in the first.</p>
  
  <p>Example:</p>
  
  <pre><code>Integer[] list1 = {1,6,2,1,4,1,2,1,8};
  
  Integer[] list2 = {1,2,1};
  </code></pre>
  
  <p>Calling <code>contains(list1, list2)</code> would return <code>true</code>. I get the idea of nested for loops that can iterate through an array, but I can't see a clear solution:</p>
  
  <pre><code>public static Boolean contains(Integer[] listOfNumbers1, Integer[] listOfNumbers2){
  
      for(int i = 0 ; i &lt; listOfNumbers2.length; i++){
  
          for(int j = 0 ; j &lt; listOfNumbers1.length; j++){
  
          }
      }
  
      return true;
  }
  </code></pre>