This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Janani, Answer c is no doubt wrong because of its syntax. it holds good only a RandomAccess file. Answer a is also wrong because there is no method by which u can read a line using the FileInputStream. It can only read bytes of data rather than in terms of Strings or chars or primitives. Answer b is the correct answer. The question is which of the following correctly reads a LINE of String objects. Hope this helps. ------------------ Regards, V. Kishan Kumar
IMHO, none of them would work... The case of the FileInputStream() method in (b) is incorrect (there's no upper-case T in the method name): DataInputStream dis = new DataInputStream(new FileInputSTream("FileName.txt")); Call me Mr Picky Pedant, but the exam does call for exactitude.