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



Comment Added by : sampada

Comment Added at : 2012-04-18 07:45:19

Comment on Tutorial : FileReader and FileWriter example program in Java By Tamil Selvan
hi I am getting error while running this program as below
C:\Program Files\Java\jdk1.6.0_07\bin>javac FileWirterDemo.java
FileWirterDemo.java:9: cannot find symbol
symbol : constructor FileWriter(java.lang.String)
location: class FileWriter
FileWriter f0 = new FileWriter("file1.txt");
^
FileWirterDemo.java:11: cannot find symbol
symbol : method write(char)
location: class FileWriter
f0.write(buffer[i]);
^
FileWirterDemo.java:13: cannot find symbol
symbol : method close()
location: class FileWriter
f0.close();
^
FileWirterDemo.java:14: cannot find symbol
symbol : constructor FileWriter(java.lang.String)
location: class FileWriter
FileWriter f1 = new FileWriter("file2.txt");
^
FileWirterDemo.java:15: cannot find symbol
symbol : method write(char[])
location: class FileWriter
f1.write(buffer);
^
FileWirterDemo.java:16: cannot find symbol
symbol : method close()
location: class FileWriter
f1.close();
^
FileWirterDemo.java:17: cannot find symbol
symbol : constructor FileWriter(java.lang.String)
location: class FileWriter
FileWriter f2 = new FileWriter("file3.txt");
^
FileWirterDemo.java:18: cannot find symbol
symbol : variable lengthbuffer
location: class char[]
f2.write(buffer,buffer.lengthbuffer.
^
FileWirterDemo.java:18: cannot find symbol
symbol : method write(char[],int,int)
location: class FileWriter
f2.write(buffer,buffer.lengthbuffer.
^
FileWirterDemo.java:20: cannot find symbol
symbol : method close()
location: class FileWriter
f2.close();
^
.\FileWriter.java:22: cannot find symbol
symbol : constructor FileWriter(java.lang.String)
location: class FileWriter
FileWriter fstream = new FileWriter(file_name);
^
11 errors


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. Thanks a lot. It solved my problem in a second.
View Tutorial          By: Suddy at 2010-03-25 14:56:10

2. Pls put all this code in one folder(Full project d
View Tutorial          By: Guruprasada at 2011-09-15 07:27:57

3. this code is not working properly buddies. please
View Tutorial          By: hammad at 2011-06-10 01:53:39

4. Could you please send me steps to execute the code
View Tutorial          By: Roshan at 2009-12-23 21:32:29

5. Out of -1, 0, and 1 which one can I use as second
View Tutorial          By: Sanjay Bhosale at 2011-12-06 13:17:54

6. Assalamu alaikum saaliya sir,

Could

View Tutorial          By: Jaffer sulaiman at 2014-08-23 06:01:20

7. clearly explained the pgm logic....
thnx...

View Tutorial          By: Akshaya at 2011-11-24 04:12:36

8. I want to say, that you have to give complete code
View Tutorial          By: Jasvir Yadav at 2009-09-05 07:23:15

9. Thanks ... nice one with clear picture.
View Tutorial          By: Nithin at 2012-04-01 06:58:41

10. hi..
recipient: 9994852342 message: chadru<

View Tutorial          By: chandrasekaran at 2009-05-04 09:00:47