为什么我的demo下面没有创建出来文件
package com.imooc.rd;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
public class RafDemo {
public static void main(String[] args) throws IOException{
File demo=new File("demo");
if(!demo.exists()){
demo.mkdirs();
File file=new File(demo,"raf.dat");
if(!file.exists()){
file.createNewFile();
RandomAccessFile raf=new RandomAccessFile(file,"rw");
raf.write('A');
System.out.println(raf.getFilePointer());
}
}
}
}