java open directory
<p>I would like to be able to open up directories using java code, directory being a "folder" that contains folder which in term contains files. This is the part of the code that I have now: </p>

<pre><code>   public void listFiles(String folder){
   File directory = new File(folder);
   File[] contents = directory.listFiles();
   System.out.println(contents);
</code></pre>

<p>For some reason, if I point the folder to the directory level, it returns this line to me: </p>

<pre><code>   [Ljava.io.File;@67d07b41
</code></pre>

<p>But if I point it one level down (at the folder level, which directly contains the files) then it will list out the file names in the folder just fine. Can someone give me pointers as to why this is not working for me?</p>
