After creating file using java, there were no values in it -
i have created file using java, following code
string filecontent= "hei";
creating file
printwriter writer=new printwriter("d://balanworkspace//coretest//corejavatest//src//intvquestest//mydet3_8.txt","utf-8");
printing string
system.out.println(filecontent);
writing file
writer.println(filecontent);
when opened file, there no values. why so?
you need close printwriter
doing this:
writer.close();
Comments
Post a Comment