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



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. Your answer was right on the money! After searchi
View Tutorial          By: ooh la la at 2013-07-19 20:33:41

2. for user input use this method....
1. impor

View Tutorial          By: susmit at 2011-03-02 09:09:46

3. Very usefull tutorial, but I've got a question:
View Tutorial          By: Wolfgang Marcos at 2011-05-16 11:12:19

4. hi,
when i run the code i got the exception

View Tutorial          By: arjun at 2014-09-18 10:25:18

5. very well to understand
View Tutorial          By: Siva Krishna N at 2007-02-16 23:06:07

6. The logo is a cup of coffee. Java is an island in
View Tutorial          By: kamal goduguluri at 2012-05-30 15:34:21

7. HI EVERY ONE I AM NEW IN J2ME SO I WANT TO LEARN S
View Tutorial          By: KALAI at 2011-04-04 03:10:32

8. Hi, thank you so much for this. I am going to give
View Tutorial          By: Eddie at 2011-02-21 14:10:04

9. Excellent article
View Tutorial          By: JJ at 2011-03-21 13:42:35

10. hi..!!
In the above code samples there is a

View Tutorial          By: chiru at 2009-07-03 03:29:18