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. hi i want to know
can i sent picture of si

View Tutorial          By: Nauman Khalid at 2011-12-10 11:50:39

2. wow...great MAN
View Tutorial          By: Er Sounderarajan at 2013-03-13 07:29:58

3. Dear admin,
your Recaptcha design is not go

View Tutorial          By: surendra kumar sharma at 2013-02-02 05:58:35

4. gr8 tute dude.... ezy n nice..
View Tutorial          By: hErC!! at 2010-04-20 23:52:19

5. How to print lee alone for the eg above........I n
View Tutorial          By: sa at 2013-04-01 07:43:03

6. Please help .... I can't access this code. so any
View Tutorial          By: Sonu Kumar at 2014-02-26 11:31:08

7. super
View Tutorial          By: chalamareddy at 2012-10-08 18:08:29

8. thank u its a clear information .i got the solutio
View Tutorial          By: anand at 2011-06-29 09:30:12

9. Thanks for a great post. Solved a problem for me i
View Tutorial          By: Mark at 2013-01-08 07:00:47

10. hi please help me out.. how to use this card for r
View Tutorial          By: sasivarnan at 2011-04-27 15:01:12