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



Comment Added by : LILI

Comment Added at : 2011-11-06 01:47:20

Comment on Tutorial : FileReader and FileWriter example program in Java By Tamil Selvan
i WROTE A FILE READER LIKE IT WAS IN THE SAMPLE BUT STILL CAN COMPILE IT, CAN SOMEONE HELP
import java.io.*;
class FileReaderDemo {
public static void main(String args[]) throws Exception {
FileReader fr = new FileReader("FileReaderDemo.java");
BufferedReader br = new BufferedReader(fr);
String s;
while((s = br.readLine()) != null) {
System.out.println(s);
}
fr.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. Many thanks. I had that problem and your code solv
View Tutorial          By: Gianni at 2009-05-06 10:02:14

2. nice ....Simple undersstanding..
View Tutorial          By: Anjaneyulu at 2013-06-15 04:43:45

3. Good Example esp. way it was presented.
View Tutorial          By: Arunlal at 2013-06-20 11:56:43

4. good explanation
View Tutorial          By: Vishu Sharma at 2013-03-13 13:57:11

5. Thank you for this tutorial. Thank you all the mor
View Tutorial          By: sd at 2013-09-09 05:38:52

6. Simple Example. Understood. Thanx.
In aksha

View Tutorial          By: Amila Nadanda at 2011-07-28 06:21:05

7. does this code work with netbeans. if not can anyo
View Tutorial          By: Alton at 2010-04-02 22:36:57

8. HI there, thanks for taking time to write this dow
View Tutorial          By: nick at 2012-07-31 10:41:47

9. Hello,
this is good example, but that is on

View Tutorial          By: Zubair at 2011-11-10 20:46:39

10. can you clearly reveal how to create crystal repor
View Tutorial          By: halim at 2011-07-02 00:28:48