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()

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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()

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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()

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum