Brad Stuvenski

Greenhorn
+ Follow
since Feb 02, 2018
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brad Stuvenski

Why is there a check to see if Java is -1, why not a multiple like -10, or -33?  Secondly, I believe this is to check if the data read is out of bounds (it should get to -1 at the end of the buffer read if I recall).
I have seen an explanation before, I am unable to find it at the moment. Any hints are appreciated.



Source: http://tutorials.jenkov.com/java-exception-handling/try-with-resources.html
6 years ago