String input="1234";
DataOutputStream out=new DataOutputStream(new FileOutputStream("passwd/input.dat"));
out.writeUTF(input);
//若要input.dat 文件创建成功,必须存在先在当前目录下创建passwd目录
java FileOutputStream流文件创建注意事项
最新推荐文章于 2022-08-21 12:20:38 发布
String input="1234";
DataOutputStream out=new DataOutputStream(new FileOutputStream("passwd/input.dat"));
out.writeUTF(input);
//若要input.dat 文件创建成功,必须存在先在当前目录下创建passwd目录