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



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. Better theory for those who have just started.

View Tutorial          By: kunal at 2010-05-13 05:55:05

2. Hi there,
this doesnt work in IE7 or firefo

View Tutorial          By: Gerrard at 2009-10-17 15:19:24

3. how to java program run in system and how to open
View Tutorial          By: safeek at 2012-10-20 06:54:38

4. How can you print this using recursion?

View Tutorial          By: Menon at 2011-09-08 07:16:02

5. its work well , thanks for code , but if any body
View Tutorial          By: mary at 2007-12-16 07:10:58

6. estimado lo que sucede es que solo cuando es Strin
View Tutorial          By: hormiga at 2013-01-07 00:11:54

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

8. change
for(counter=0;counter<=length-1;l

View Tutorial          By: Dan at 2012-05-28 04:53:14

9. In TimeServer eif = service.getPort(TimeServer.cla
View Tutorial          By: Vijay at 2015-02-01 08:59:19

10. How to delete file button
View Tutorial          By: Chinzoo at 2013-04-13 13:30:18