title: Print a string from ArrayList of String[]?
body: <p>I have an ArrayList full of strings arrays that I built like this:</p>
  
  <pre><code>String[] words = new String[tokens.length];
  </code></pre>
  
  <p>I have three arrays like above in my ArrayList:</p>
  
  <pre><code>surroundingWords.add(words);
  surroundingWords.add(words1);
  surroundingWords.add(words2);
  </code></pre>
  
  <p>etc</p>
  
  <p>Now if I want to print out the elements in the String arrays within surroundingWords... I can't.
  The closest I can get to displaying the contents of the String[] arrays is their addresses:</p>
  
  <pre><code>[Ljava.lang.String;@1888759
  [Ljava.lang.String;@6e1408
  [Ljava.lang.String;@e53108
  </code></pre>
  
  <p>I've tried a lot of different versions of what seems to be the same thing, the last try was:</p>
  
  <pre><code>for (int i = 0; i &lt; surroudingWords.size(); i++) {
          String[] strings = surroundingWords.get(i);
          for (int j = 0; j &lt; strings.length; j++) {
              System.out.print(strings[j] + " ");
          }
          System.out.println();
      }
  </code></pre>
  
  <p>I can't get past this because of incompatible types:</p>
  
  <pre><code>found   : java.lang.Object
  required: java.lang.String[]
                  String[] strings = surroundingWords.get(i);
                                                         ^
  </code></pre>
  
  <p>Help!</p>
  
  <p>I've already tried the solutions here: <a href="https://stackoverflow.com/questions/2983577/java-print-and-access-list-string">Print and access List </a></p>