title: Java: split() returns [Ljava.lang.String;@186d4c1], why?
body: <p>And i have no idea why!</p>
  
  <p>I bascially have a STRING (yes, not an array), that has the following contents:</p>
  
  <pre><code>[something, something else, somoething, trallala, something]
  </code></pre>
  
  <p>And i want to turn it into a String[]. So first off i substring() off the first and the last character to get rid of the brackets []. Then i use the split() function to split by comma. I tried using both "\|" and "," and "\," with the same results.</p>
  
  <p>This is what i get:</p>
  
  <pre><code>[Ljava.lang.String;@186d4c1
  </code></pre>
  
  <p>Here's the code for it. I made it into a one-liner:</p>
  
  <pre><code>String[] urlArr = ((matcher.group(3).toString()).substring(1, (matcher.group(3).length()-1))).split(",");
  </code></pre>
  
  <p>As you can see the first part is (matcher.group(3).toString()), and it DOES return a valid string (like the example i posted above). So i don't get why it's not working.</p>
  
  <p>Any ideas?</p>
  
  <p>EDIT:</p>
  
  <p>I clarified the code a bit:</p>
  
  <pre><code>String arrString = matcher.group(3).toString();
  int length = arrString.length();
  String[] urlArr = (arrString.substring(1, length-1)).split(",");
  System.out.println(urlArr);
  </code></pre>