title: Searching Two Arrays
body: <p>I'm a Java newbie and need help with Arrays.</p>
  
  <p>I have two arrays right now.</p>
  
  <pre><code>int [] array1 = {2,5,7};
  int [] array2 = {3,5,9};
  </code></pre>
  
  <p>I have to find the first matching elements between the two arrays which is clearly 5. Obviously first we are going to look through the elements in array1 and then look up these elements to see if they are in array2 as well. I'm pretty sure I have to use a loop, just not sure which and how to code it. Any help would be appreciated. Thanks. </p>