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



Ask a Question

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. i m a student of Bahria university,Pakistan.and th
View Tutorial          By: Rao Waseem at 2011-05-14 12:55:53

2. how can get ip url...?
View Tutorial          By: arjuna at 2011-11-23 03:31:46

3. thank you...
View Tutorial          By: Rojan at 2011-07-04 01:51:45

4. Thanks :) It works for me :)
View Tutorial          By: Milind at 2011-12-07 10:05:23

5. sir every time we are using this.wedth(for example
View Tutorial          By: praveen kumar at 2011-06-28 01:33:44

6. Able to connect to mobile
Unable to send me

View Tutorial          By: Prashant at 2011-04-24 01:16:27

7. I take it English is not your 'hardcore', because
View Tutorial          By: Fred at 2013-01-17 14:49:09

8. Your Work is Good, But i want to ask if there is a
View Tutorial          By: Good Muyis at 2011-01-08 09:47:14

9. Very good explanation . I was very confuse but rea
View Tutorial          By: Shahabaj at 2010-08-10 08:58:39

10. If the compiler takes care of this pointer implici
View Tutorial          By: Bhanu Noah at 2012-03-15 16:20:05