1.

Choose the output returned when an error condition is generated while read() reads from the console.(a) False(b) 0(c) -1(d) All of the mentioned

Answer» Right option is (c) -1

To explain I would say: Read() returns –1 on error. This method also throws an IOException on failure.


Discussion

No Comment Found

Related InterviewSolutions