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 so much, this was extremely helpful and rea
View Tutorial          By: gabrielle at 2013-10-04 22:07:17

2. Good work. Although it would be nicer if you can p
View Tutorial          By: frisked09 at 2011-05-26 23:52:34

3. Excellent information reg the scopes of jsp , plea
View Tutorial          By: venkateshwarreddy suravaram at 2012-01-09 08:34:23

4. hi,Very Nice tutorials and iwant to know how to ch
View Tutorial          By: vimala at 2010-07-08 05:05:17

5. The example is wrong, because there are two sepera
View Tutorial          By: billGates at 2010-07-06 16:56:13

6. yaar this example is easy to understand but other
View Tutorial          By: richa at 2009-09-08 13:52:37

7. plz explain in
simple way like give ea

View Tutorial          By: mani at 2008-10-20 01:32:50

8. good
View Tutorial          By: epuri at 2008-09-09 01:05:56

9. can u pls tell me how to retrive data from databas
View Tutorial          By: yogesg desai at 2010-05-27 08:26:24

10. Hi! I'm working on Ubuntu 10.04

At

View Tutorial          By: Rushabh at 2011-01-12 06:22:43