Knowee
Questions
Features
Study Tools

Which of these classes can return more than one character to be returned to input stream?OptionsBufferedwriterBufferedReaderPushbachReaderCharArrayReader

Question

Which of these classes can return more than one character to be returned to input stream?OptionsBufferedwriterBufferedReaderPushbachReaderCharArrayReader

🧐 Not the exact question you are looking for?Go ask a question

Solution

The class that can return more than one character to the input stream is the PushbackReader class.

Here's why:

  1. BufferedWriter: This class is used to write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings. It doesn't have the ability to return characters to the input stream.

  2. BufferedReader: This class reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. While it does have a method to "unread" characters, it's limited to a single character.

  3. PushbackReader: This class adds functionality to another instance of the Reader class. It allows one to "unread" characters (push them back into the stream). It can "unread" multiple characters, which makes it the correct answer.

  4. CharArrayReader: This class is used to implement a character buffer that can be used as a character-input stream. It doesn't have the ability to return characters to the input stream.

This problem has been solved

Similar Questions

Which of these class can be used to implement the input stream that uses a character array as the source?OptionsFileReaderBufferedReaderCharArrayReaderFileArrayReader

Which of the following classes is used to read the stream of the character?Options: Pick one correct answer from belowScannerBufferedReaderInputStreamReaderNone of the above

Which of these stream contains the classes which can work on character stream?OptionsOutputStreamInputStreamCharacter StreamAll of the mentioned

Which of these class is not related to input and output stream in terms of functioning?OptionsWriterFileInputStreamReader

Select the correct answerWhich of these class is not related to input and output stream in terms of functioning?OptionsInputStreamWriterFileReader

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.