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



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. Very Great thanks for the code
View Tutorial          By: Alvin Funelas at 2014-07-12 00:42:01

2. thanks ..it was really helpful.
View Tutorial          By: jay at 2012-03-19 04:17:14

3. I running this on localhost offline and getting er
View Tutorial          By: nitisha at 2011-05-14 09:18:16

4. Nice Explanation.....
View Tutorial          By: Vinoth at 2012-06-20 09:37:21

5. Very good explanation . I was very confuse but rea
View Tutorial          By: Shahabaj at 2010-08-10 08:58:39

6. excellent
View Tutorial          By: amit gupta at 2012-07-03 12:31:31

7. vinod kumar for j2me app development we need one I
View Tutorial          By: saurabh dixit at 2013-04-18 09:59:23

8. Can anybody send me the java full code for sending
View Tutorial          By: David at 2010-08-22 22:57:38

9. i tried your code but i got an error on this line<
View Tutorial          By: edward at 2011-12-09 11:32:30

10. i manage to download all the 5 part and compile th
View Tutorial          By: Selva at 2008-04-09 07:53:09