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. nice!!!!
View Tutorial          By: svk at 2013-01-17 19:59:05

2. Hi Prathamesh,
Maybe the COM port to which

View Tutorial          By: Ramlak at 2007-03-19 00:46:49

3. hi
Instead of sending a int type pass an ar

View Tutorial          By: Sanju at 2014-12-04 08:51:18

4. nice one its very useful
View Tutorial          By: jhejhe at 2010-02-21 05:03:50

5. Oh, Thanks for your code, but I think you should a
View Tutorial          By: Songokute at 2013-01-29 13:55:13

6. The code gives the following exception :-
<

View Tutorial          By: VIKRAM at 2007-03-11 22:56:16

7. Hi,
this is excellent stuff and I highly ap

View Tutorial          By: Nanda at 2007-11-02 04:58:30

8. Perfectly working, and able to connect database.
View Tutorial          By: satyajit at 2012-06-01 20:16:53

9. Artical is good but it is not clearly define that
View Tutorial          By: Rohit Saxena at 2010-09-02 04:00:11

10. I got Error...Why it is happen..??


View Tutorial          By: Dineth at 2011-07-15 16:54:31