Home / CSE MCQs / JAVA MCQs :: Java.io Package

CSE MCQs :: JAVA MCQs

  1. Which of these is a method to clear all the data present in output buffers?
  2. A.
    clear()
    B.
    flush()
    C.
    fflush()
    D.
    close()

  3. Which of these is method is used for writing bytes to an outputstream?
  4. A.
    put()
    B.
    print()
    C.
    printf()
    D.
    write()

  5. Which of these stream contains the classes which can work on character stream?
  6. A.
    InputStream
    B.
    OutputStream
    C.
    Character Stream
    D.
    All of the mentioned

  7. Which of these class is used to read characters in a file?
  8. A.
    FileReader
    B.
    FileWriter
    C.
    FileInputStream
    D.
    InputStreamReader

  9. Which of these method of FileReader class is used to read characters from a file?
  10. A.
    read()
    B.
    scanf()
    C.
    get()
    D.
    getInteger()

  11. Which of these class can be used to implement input stream that uses a character array as the source?
  12. A.
    BufferedReader
    B.
    FileReader
    C.
    CharArrayReader
    D.
    FileArrayReader

  13. Which of these is a method to clear all the data present in output buffers?
  14. A.
    clear()
    B.
    flush()
    C.
    fflush()
    D.
    close()

  15. Which of these classes can return more than one character to be returned to input stream?
  16. A.
    BufferedReader
    B.
    Bufferedwriter
    C.
    PushbachReader
    D.
    CharArrayReader