1 Reply Latest reply on Nov 16, 2008 3:37 PM by 807589

    Why can't I get a new line using PrintWriter

      why can't I get a new line in my file when writing out to the file like this.

                for(int a = 0;a<10;a++)
                fow = new FileWriter("c:\\San Data\\"+myFilesStrings[4].substring(0,6)+".PRN");
                     bwr = new BufferedWriter(fow);
                     pow = new PrintWriter(bwr,false);
                     //pow.write("new\n"+ "old");
                     //JOptionPane.showMessageDialog(null,"HelloIN" + myFilesStrings[a]);
           //BufferedWriter bwr = new BufferedWriter(fwr);
           catch(IOException e){System.out.println(e);e.printStackTrace();         }

      the +"\n" above in the pow.wirte... is not working!

      Can anyone tell me why? Thanks in advance....