public static void main(String[] args) {
String path="F:/1.txt";
FileOutputStream fo=null;
try {
fo=new FileOutputStream(path);
String str="Vue.JS";
byte[] data=str.getBytes();
fo.write(data);
fo.flush();
} catch (Exception e) {
if(fo!=null) {
try {
fo.close();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
}
网友评论