ok.... I am trying to compare elements of 2 arrays and have had no success. This is what i am trying to do... get a list of a folder and store it in an file[] array. Then i get the lenght() of that file and want to store it in an long[], since that is what the .lenght() returns (from java.io.File). However, when I run this example i get the following error.. that error refers to this line.. sizeWorkFolder[i] = filesInWorkFolder[i].length(); //stores size of file to array
The intresting thin is that if i replace sizeWorkFolder[i] for a regular long variable, i get no error!!
Exception in
thread "main" java.lang.NullPointerException
at DownloadFolderSample.main(DownloadFolderSample.java:71)