Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Maria Silva   on Dec 26 In Java Category.

  
Question Answered By: Oscar Evans   on Dec 26

EOF is not END OF FILE. its a character. it is not a true EOF. conside
the program you are writing to test for EOF. it must contain a
character of value 0 before the end of the file!

what you want is to know the file  size.

which loop counter != file size
read file
if content = 13 || content = 11 (line feed characters)
...
end if
loop

get the file size using the File object
compare characters using (String)s.charAt(int)

Share: 

 
 
Didn't find what you were looking for? Find more on Help finding EOF Or get search suggestion and latest updates.


Tagged: