title: JSoup create array list from elements list
body: <p>so I am grabbing a BIG list of elements using JSoup from a page. When I say big, I mean like a few hundred elements. I know that the elements are there because I converted them all to one huge string and they were all listed. Now what I need to do is put them into an array so I can process them 1 by 1. Here is my current code:</p>
  
  <pre><code>    public static String [] grabWordList(String ending) throws IOException, InterruptedException{
  
  Document doc = Jsoup.connect("http://site.com/").get();
  Elements links = doc.getElementsByClass("defLink"); //Get words from site
  String s[] = new String[links.size()]; //Create an array
  
  int i = 0;
  for(Element el : links){  //Attempt to put them into an array using this loop of blindly coppy and pasted code (I know, HORRIBLE Idea, I dont usually do that, but I am lost)
      s[i++] = el.attr("links");
  }
   return s;
      }
  </code></pre>
  
  <p>When I do this, I use this code to attempt to grab the array and print it:</p>
  
  <pre><code>String words[] = Methods.grabWordList("in");
  
     for(int j=0; j &lt; words.length; j++){
         System.out.println(words[j]);
     }
  </code></pre>
  
  <p>When running this code, all that prints is <code>[Ljava.lang.String;@6201dbc</code>
  Im hoping that someone can help. Thanks!</p>