1.

Which of these methods are used to read in from file?(a) get()(b) read()(c) scan()(d) readFileInput()This question was posed to me during an online exam.My question is taken from Reading & Writing Files in chapter I/O & Applets of Java

Answer»

Right choice is (B) read()

To explain: Each TIME read() is called, it READS a single byte from the file and returns the byte as an integer value. read() returns -1 when the END of the file is encountered.



Discussion

No Comment Found

Related InterviewSolutions