主题:请教问题
public File[] getFolderFile3()
{
File dir = new File("");
String sb =dir.getAbsolutePath();
File sub = new File(sb);
File []files = sub.listFiles();
File [] newFile= new File[30];
int j=0;
for(int i=0; i<files.length; i++ )
{
if(files[i].isFile())
{
String name =files[i].getName();
int point =name.indexOf(".");
String rightPart=name.substring(point,name.length());
System.out.println(rightPart);
System.out.println(rightPart.equals(".txt.bak.bak"));
if(rightPart.equals(".txt.bak.bak"));
{
newFile[j++]=files[i];
System.out.println(files[i]);
System.out.println("12312");
System.out.println(newFile[j]);
}
}
}
return newFile;
}
请问 newFile[j] 为什么是NULL