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



Comment Added by : João

Comment Added at : 2012-04-11 19:22:14

Comment on Tutorial : FileReader and FileWriter example program in Java By Tamil Selvan
The actual code to write F2 is:
f2.write(buffer,buffer.length-buffer.length/4,buffer.length/4);
f2.close();

Because here you "say"
Write the buffer.
Starting from buffer.length-buffer.length/4
= 96-(96/4) = 96-24 = 72.
Than it will start after the 72tah char of buffer.

And finally write buffer.length/4 = (24 chars)


View Tutorial



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. You are using "this" to start to the thr
View Tutorial          By: sumit at 2014-10-30 08:14:55

2. Very good example with explaination and sample cod
View Tutorial          By: plenitude at 2010-04-15 23:55:02

3. Can you send me the full code for sending sms usin
View Tutorial          By: Tamizh chelvam at 2014-03-24 17:30:52

4. its easy to understand your example in overloading
View Tutorial          By: rovie at 2011-09-07 02:41:12

5. Wow Such a good tutorial. It really really make me
View Tutorial          By: Anonymous at 2010-02-19 05:53:11

6. thanks for this example
View Tutorial          By: hai at 2011-12-16 05:36:14

7. #include<iostream>
#include<conio.

View Tutorial          By: XavioR at 2011-01-31 00:53:11

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

9. sir can you write the sample proram of this:

View Tutorial          By: bryan labastida at 2011-06-29 02:53:14

10. good job
View Tutorial          By: gopi at 2008-07-01 02:02:48