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



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. Great!! But when I use wscompile to create stub,I
View Tutorial          By: Baven at 2008-07-22 15:55:52

2. Getting Invalid IPv4 format J2me Midp 2.0, Asp.net
View Tutorial          By: Anup at 2013-01-02 05:11:51

3. sir i am mca student. i can choose my flatform is
View Tutorial          By: sridevi at 2012-06-06 10:21:39

4. Gives a syntax error
View Tutorial          By: Siddharth at 2015-06-10 05:15:00

5. I love http://www.java-samples.com very much , I w
View Tutorial          By: Phongveth at 2009-03-13 13:15:04

6. nice to learn abt it
View Tutorial          By: aice at 2012-08-25 12:49:35

7. Everything is running.... But it doesn't send....<
View Tutorial          By: uu at 2009-04-09 18:10:13

8. today Iam getting time ,date of sending and "
View Tutorial          By: raghu at 2012-01-07 14:43:32

9. Very nice tutorial........
View Tutorial          By: Santosh Saha at 2010-04-11 05:58:51

10. error :

Object reference not set to

View Tutorial          By: Ramnath at 2011-05-30 04:01:32