代码是:String[] absoluteFilePath = null;try {File file = new File(filePath);if( file.isDirectory()) {System.out.println(“文件夹”);String[] fileList = file.list();
for (int i = 0; i < fileList.length; i++) {
File fullFile = new File(filePath + “\” + fileList[i]);
absoluteFilePath[i] = fullFile.getAbsolutePath(); System.out.println(“absoluteFilePath=” + absoluteFilePath[i]);}}}
然后会在 absoluteFilePath[i] = fullFile.getAbsolutePath(); 这一行报java.lang.NullPointerException
回首往事,日子里竟全是斑澜的光影,