/**
* Reads characters into an array. This method will block until some input
* is available, an I/O error occurs, or the end of the stream is reached.
*
* @param cbuf Destination buffer
*
* @return The number of characters read, or -1
* if the end of the stream
* has been reached
*
* @exception IOException If an I/O error occurs
*/
public int read(char cbuf[]) throws IOException {
return read(cbuf, 0, cbuf.length);
}
Correct answer is D
A & B will show an error because : The method readLine() is undefined for the type FileReader.
C will show an error because : Cannot invoke read() on the array type char[]
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
tapwa
4 months, 3 weeks agolmocanasu
1 year, 4 months agoOmnisumem
1 year, 5 months agoStavok
1 year, 8 months agoMukes877
1 year, 8 months agoJGR_77
1 year, 10 months agoJGR_77
1 year, 10 months agoObalt
1 year, 12 months ago