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. thanks! it helped!
View Tutorial          By: shgy at 2015-03-17 07:42:40

2. It is very good example to know the concept better
View Tutorial          By: abdulkadir at 2010-01-27 00:56:07

3. But the above code is not working, when we send SM
View Tutorial          By: SenthilPandi ChandraSekaran at 2011-06-08 07:22:31

4. Can anybody tell me how to send and receive SMS us
View Tutorial          By: Bharat Lahori at 2010-02-04 07:14:19

5. Sir , I am doing MSc(swe) . I want to know more ab
View Tutorial          By: guru prakash at 2009-10-15 09:10:05

6. Nice Example...!
View Tutorial          By: Kuldeep Singh at 2009-10-18 23:58:17

7. this s seems to be writing contents into a text fi
View Tutorial          By: Iswariya at 2010-02-11 02:59:51

8. hey hiii.
at last the progrma has be runnin

View Tutorial          By: jugal at 2009-02-20 08:22:31

9. this is a very good artical about floating &
View Tutorial          By: Gayathri at 2012-10-31 12:19:28

10. What is the difference between an Interface and an
View Tutorial          By: RAJA at 2015-06-26 17:28:31