Thanks Paul Clapham for your second reply. In your reply, you wrote:
I don't see any code which prints "C:\", so I don't know where that is coming from
.
Here's my answer:
In the output of the JVM I showed in my first post, the first line was:
.
That is why I think the
is displayed by the line 30 of the source file I showed in my first post.And when I remove the lines 31, 32,33,34 and 35 of of the source file I showed in my first post, the source file is compiled successfully and the output when I launch the resulting class file is fine:
.
So, it seems like at line 29 in the the source file I showed in
my first post, File.listRoots()
is an array of two elements (the first element corresponding to the physical directory C:\ ,and the second directory corresponding to the physical directory D:\), and the program outputs C:\at line 30 of the source file I showed
in my first post and for the first iteration in the for loop of the main method . So, fi at line 30 for the first iteration of the for loop of the main method refers to the physical directory C:\. Consequently, at line 31 for the first iteration of the for loop of the main method in the the source file I showed
in my first post,the method AllF(fi) should give me all the files (physical files and physical directories) of the partition C:\, but it's like that is there that problems began.
Thanks.