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

String input="1234";
DataOutputStream out=new DataOutputStream(new FileOutputStream("passwd/input.dat"));
out.writeUTF(input);
//若要input.dat 文件创建成功,必须存在先在当前目录下创建passwd目录