• Post Reply Bookmark Topic Watch Topic
  • New Topic

EOF character in java  RSS feed

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there No EOF character in java thats why we need to use -1 as EOF character ???
 
Sheriff
Posts: 22846
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, that's not right. Java doesn't decide what gets to be a character or not. That's up to Unicode, and then Java just uses Unicode's definition of a character.

But anyway it's possible to write any character you like into a file. So it wouldn't make sense to name one character as the "end of file" character; what would happen if you wanted to put that character into a file?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!