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



Comment Added by : Chezhian TK

Comment Added at : 2010-10-14 21:40:16

Comment on Tutorial : FileReader and FileWriter example program in Java By Tamil Selvan
Simple file writer example. .............

import java.io.BufferedWriter;
import java.io.FileWriter;

public class FileWriterDemo {
public static void main(String args[]) throws Exception
{

FileWriter fw = new FileWriter("mytest.txt");
BufferedWriter bw = new BufferedWriter(fw);
bw.write("test2");
bw.close();
fw=null;

}
}


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. Dear admin,
your Recaptcha design is not go

View Tutorial          By: surendra kumar sharma at 2013-02-02 05:58:35

2. hi all,

i successfully executed the

View Tutorial          By: praveen at 2010-07-14 04:47:41

3. This is really a tremendous tutorials for the begi
View Tutorial          By: Raghvendra Dwivedi at 2010-09-01 10:22:42

4. I have a source code of j2ee. but i want to conver
View Tutorial          By: bangaram at 2011-06-07 09:28:45

5. hi all i receive below error can any one help me p
View Tutorial          By: Purushothaman at 2009-04-03 17:38:42

6. thanku verymuch. very helpfull
View Tutorial          By: praveen at 2010-08-05 06:04:35

7. Yes, you can use the newer one as follows

View Tutorial          By: John at 2012-08-11 01:40:46

8. You can not overload the private method in Test cl
View Tutorial          By: Gaurav at 2013-07-28 15:53:20

9. may i have one more example
View Tutorial          By: bujii at 2015-05-08 03:04:40

10. thanks...helped a lot!!!!
View Tutorial          By: Sc21ac at 2013-05-03 03:44:06