我用java创建了文件,代码如下
String Filecontent= "hei";
Run Code Online (Sandbox Code Playgroud)
创建文件
PrintWriter writer=new PrintWriter("D://balanworkspace//Coretest//Corejavatest//src//intvquestest//mydet3_8.txt","UTF-8");
Run Code Online (Sandbox Code Playgroud)
打印字符串
System.out.println(Filecontent);
Run Code Online (Sandbox Code Playgroud)
写入文件
writer.println(Filecontent);
Run Code Online (Sandbox Code Playgroud)
当我打开文件时,没有值.为什么会这样?