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



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. cool.
View Tutorial          By: Fahad Palomo at 2011-08-03 06:19:56

2. Hi. I put the file .cert in two paths:
C:\P

View Tutorial          By: ALFREDO at 2012-09-18 16:22:16

3. i can't get getword function.Where is that written
View Tutorial          By: withu at 2010-01-26 23:25:12

4. Hi!
Any body have code for recieving sms fr

View Tutorial          By: Haseeb at 2009-07-01 04:59:13

5. I am an MCA student i wanna know whether one can s
View Tutorial          By: RAJU.K at 2009-07-24 02:28:21

6. thanks, i will try. but can u tell me how to send
View Tutorial          By: ketut joko wibawa at 2011-01-02 05:18:01

7. Post your errors, so that others may help you my f
View Tutorial          By: yogesh at 2010-01-12 00:45:42

8. very good to use
View Tutorial          By: baby at 2013-06-14 12:08:14

9. Hi, you put a semicolon after "int main()&quo
View Tutorial          By: noel4037 at 2009-12-28 06:40:17

10. Thanx................!!!!!!!!!!!
View Tutorial          By: ankita at 2012-01-21 19:16:54