count characters in a file

What is code for counting the number of characters in a file?
I've written out a file, now i want the number of characters in it.
xoxomosAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
file.length();
0
 
amxCommented:
i'm assuming that if you have written out the file then you must have asssigned it to a String variable before printing out the file.

if you have then you could just find out the length of the string which would be the same as the number of characters.

0
 
xoxomosAuthor Commented:
Thanks, I don't know how this got in there 4 times.
0
All Courses

From novice to tech pro — start learning today.