title: Printing elements of an array and checking another
body: <p>Some exam revision here from a past paper.</p>
  
  <p>My declared array is : </p>
  
  <pre><code>String letterArray = {g,p,l,w,r}
  </code></pre>
  
  <p>Would you personally use String or char ?</p>
  
  <p>Second up, i need to printout the 3rd element of this array, would this simply be</p>
  
  <pre><code>System.out.print(letterArray[2]) // arrays start at zero
  </code></pre>
  
  <p>third i need to check the 4th element contains a 'y', making sure the user is informed if it contains a y or not.</p>
  
  <p>would this be: </p>
  
  <pre><code>if(letterArray[3] == y)
  {
      System.out.println("It contains y");
  } 
  else 
  {
      System.out.println("It does not contain a y");
  }
  </code></pre>
  
  <p>sorry if ive missed characters as im on mobile with no compiler handy.</p>