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

CSE MCQs :: JAVA MCQs

  1. Which of these packages contain classes and interfaces used for input & output operations of a program?
  2. A.
    java.util
    B.
    java.lang
    C.
    java.io
    D.
    All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of these class is not a member class of java.io package?
  4. A.
    String
    B.
    StringReader
    C.
    Writer
    D.
    File

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of these interface is not a member of java.io package?
  6. A.
    DataInput
    B.
    ObjectInput
    C.
    ObjectFilter
    D.
    FileFilter

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of these class is not related to input and output stream in terms of functioning?
  8. A.
    File
    B.
    Writer
    C.
    InputStream
    D.
    Reader

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of these is specified by a File object?
  10. A.
    a file in disk
    B.
    directory path
    C.
    directory in disk
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of these is method for testing whether the specified element is a file or a directory?
  12. A.
    IsFile()
    B.
    isFile()
    C.
    Isfile()
    D.
    isfile()

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of these classes is used for input and output operation when working with bytes?
  14. A.
    InputStream
    B.
    Reader
    C.
    Writer
    D.
    All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of these class is used to read and write bytes in a file?
  16. A.
    FileReader
    B.
    FileWriter
    C.
    FileInputStream
    D.
    InputStreamReader

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of these method of InputStream is used to read integer representation of next available byte input?
  18. A.
    read()
    B.
    scanf()
    C.
    get()
    D.
    getInteger()

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which of these data type is returned by every method of OutputStream?
  20. A.
    int
    B.
    float
    C.
    byte
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum