title: java string array specific word print out
body: <p>New to java and trying to figure out how to print out a specific word in a string array. E.g.</p>
  
  <pre><code>String[] myArray = {"bread", "milk", "sugar", "coffee"} 
  </code></pre>
  
  <p>I want to just print out the second value of the array (we say <code>milk</code>, I know the array index starts at <code>0</code> but just for this example we will go with this). Any ideas how to do this. I tried the for loop but cant seem to get it going so if you guys have an example it would be appreciated.</p>
  
  <p>I cant exactly just print out by using index number. I will give a more detailed approach on how i would like it to work... Say I have two arrays 
  String[] Array1 = {"bread", "milk", "sugar", "coffee"} 
  String[] Array2 = {"butter", "tea", "spoon", "cup"} 
  So if I prompted any entry from array 1 e.g. bread (I would like it to print out something like butter then) so for each value in array1 i would like it to return the value at the same index in array2. </p>