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



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..it really worked well...!!!!
View Tutorial          By: Neelanjana at 2012-09-14 06:07:06

2. examples are very use full
View Tutorial          By: keerthe at 2010-08-12 23:00:21

3. where i can find jar files?
please tell me

View Tutorial          By: chandu at 2012-06-17 14:14:28

4. please am in Nigeria, i need to know how to send a
View Tutorial          By: kay at 2009-10-15 03:06:10

5. i got error for below line

xlApp

View Tutorial          By: Satheyaraaj at 2015-04-28 07:47:42

6. Been hearing about this for quite long. This gives
View Tutorial          By: Lolip at 2011-08-24 08:40:20

7. Just what i was looking for. tku.
View Tutorial          By: Chow Lim at 2008-03-21 01:46:52

8. Thanks a lot for your tutorial.
(: It was v

View Tutorial          By: Nevermore at 2011-08-03 10:39:32

9. can help me for program in java Tomorrow I have ex
View Tutorial          By: blasm at 2013-06-21 06:59:41

10. it's very helpful for java beginner. thanks
View Tutorial          By: Pisal at 2012-12-03 05:00:54