Jump to content

end to the file

- - - - -

  • Please log in to reply
3 replies to this topic

#1
sCode

sCode

    Newbie

  • Members
  • PipPip
  • 15 posts
How to end to the file in java?
This code replaces the entire file.
PrintWriter pw=new PrintWriter(new File("//root//file.dat"));

pw.println(var);

pw.close();

Edited by sCode, 17 December 2010 - 09:46 AM.


#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
new PrintWriter(new FileWriter(new File("//root//file.dat"), true));


#3
sCode

sCode

    Newbie

  • Members
  • PipPip
  • 15 posts
Thanks!

#4
sCode

sCode

    Newbie

  • Members
  • PipPip
  • 15 posts
Thank you very much!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users