+ 1

Please see the code bits someone explain me the second line comment. Reading the input file till there is input

    // Condition check             // Reading the input file till there is input             // present             while ((c = fis.read()) != -1) { Why the c = fis.read()) should not be equal to -1. Thank you  

6th Jan 2022, 4:54 PM
stephen haokip
stephen haokip - avatar
1 ответ
+ 9
stephen haokip , -1 is returned when the end of the file is reached.
6th Jan 2022, 5:55 PM
Lothar
Lothar - avatar