Hi, According to J2SE API documentation, The description of the methods list() and listFiles() is as followes:
String[] list()
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.
File[] listFiles()
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.
But the listFiles() method is displaying directories too and I dont understand why. I tried the same program on UNIX platform too. There is no separate method which will display just the Directories or Folders.
Thanks in advance.