java - BufferedWriter no new line is printed -


i use:

bw = new bufferedwriter(new filewriter("c:\\users\\myuser\\desktop\\docum.txt")); bw.write("hello, world!\n"); bw.write("hello!); 

but printed "hello, world!hello!", no newline being printed. should do? lot

use carriage return

bw.write("\r\n"); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -