Results 1 to 3 of 3
Thread: append variables to a text file
- 01-02-2009, 04:41 AM #1
Member
- Join Date
- Dec 2008
- Posts
- 27
- Rep Power
- 0
append variables to a text file
Hi,
I have a text file having the following format:
def234 bobby
abc123 jumbo
cde234 katie
I want to append to this text file the data contained by two variables studID and password. How do I do that?
I have tried using
Any help would be appreciated.
Thanks.Last edited by ddatta8; 01-02-2009 at 04:41 AM. Reason: wrong info
- 01-02-2009, 05:36 AM #2
Senior Member
- Join Date
- Dec 2008
- Location
- Hong Kong
- Posts
- 473
- Rep Power
- 5
use fileWriter (with append property)
with BufferedWriter
use append method to append info
finally call flush method
remember to close writer steam
- 01-02-2009, 10:17 AM #3
Member
- Join Date
- Dec 2008
- Posts
- 27
- Rep Power
- 0
Similar Threads
-
java DOM: append text to node
By newbieal in forum New To JavaReplies: 2Last Post: 10-10-2008, 07:18 PM -
find and replace text from a text file
By gezzel in forum New To JavaReplies: 2Last Post: 09-19-2008, 04:04 PM -
variables in hibernate.cfg.xml file
By bbq in forum JDBCReplies: 4Last Post: 07-05-2008, 05:47 AM -
Append text inputed in the textfield into a TextArea
By romina in forum AWT / SwingReplies: 1Last Post: 08-07-2007, 05:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks