Write data to a text file

Hi All,

Does any one have any idea on how to write java output

(ie) int recCount=0;

for (i=0;i<n;i++)

{

process

}

recCount++

is there any possibility to write the last record count that after executing the loop,to a text file (note pad) with system date and time

Notepad details must be:

recCount: :

DateandTime:>

[400 byte] By [sebas.navina] at [2007-11-27 9:57:51]
# 1
youbetcha, can be done.Read up on java i/o and you will find your answer. Just google:java tutorial i/oFirst hit is what you want.
petes1234a at 2007-7-13 0:28:12 > top of Java-index,Java Essentials,Java Programming...
# 2
i want to create a txt file,when the loop ends.when i click a button ,a function with for loop executes,at the end of the execution i want to create a a new text file with the no of recordcounts
sebas.navina at 2007-7-13 0:28:12 > top of Java-index,Java Essentials,Java Programming...
# 3

> i want to create a txt file,when the loop ends.

>

> when i click a button ,a function with for loop

> executes,at the end of the execution i want to

> create a a new text file with the no of recordcounts

What do you want to write in the file?

but anyway why dont you use FileWriter with append mode and write the whatever you want to write after executing every loop.

student@sunDNa at 2007-7-13 0:28:12 > top of Java-index,Java Essentials,Java Programming...
# 4
To me your problem is not clear .Plz elaborate with proper codeunder tags.
Adi1000a at 2007-7-13 0:28:13 > top of Java-index,Java Essentials,Java Programming...