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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -