为什么创建不出来文件呢,我也刷新了
package InputStreamDemo; import java.io.File; import java.io.IOException; public class RandomAccessFileDemo { RandomAccessFileDemo()throws IOException{ File Demo = new File("Demo"); if(!Demo.exists()){ Demo.mkdir(); } File file = new File(Demo,"file.txt"); if(!file.exists()){ file.createNewFile(); } } public static void main(String[] args) { try{ new RandomAccessFileDemo(); }catch(Exception e){ } } }