Comment on Tutorial - FileReader and FileWriter example program in Java By Tamil Selvan



Comment Added by : Joseph Harner

Comment Added at : 2011-12-04 23:20:48

Comment on Tutorial : FileReader and FileWriter example program in Java By Tamil Selvan
Simpler example:

import java.io.*;
class WriteToText {
public static void main(String args[]) throws Exception {
String source = "Now is the time for all good men to come to the aid of their country and pay their due taxes.";
FileWriter f0 = new FileWriter("file1.txt");
f0.write(source);
f0.close();
}
}


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I have successfully send sms after some trying....
View Tutorial          By: DILIP at 2012-01-19 14:38:50

2. good example
View Tutorial          By: WANT TO KNOW WHY WE USE APPEND at 2011-06-14 00:39:48

3. Highly appreciatable.Excellent Docs.
View Tutorial          By: Debi P Naik at 2010-05-04 05:55:45

4. the example program is very simple to understand a
View Tutorial          By: Zubilu at 2010-10-06 00:19:13

5. Write a times table programme. The programme shoul
View Tutorial          By: Hannah Jambalos at 2014-09-03 12:07:34

6. Wow thx, this is really easy for me to understand
View Tutorial          By: brian at 2010-03-22 05:15:47

7. Hi,
i tried this way.that works perfectly.

View Tutorial          By: indu at 2009-06-08 03:13:51

8. how to pass user input string (like a user entered
View Tutorial          By: saif at 2012-12-04 19:51:26

9. What is the \ in several of the string building st
View Tutorial          By: rogerb at 2012-01-28 23:07:31

10. This is helpful for newbies like me :P
View Tutorial          By: Mustafa at 2011-06-18 23:40:27