Files and I/O


  1. Which of these method of InputStream is used to read integer representation of next available byte input?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    read()


  1. Which of these data type is returned by every method of OutputStream?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    Every method of OutputStream returns void and throws an IOExeption in case of errors.



  1. Which of these is a method to clear all the data present in output buffers?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    flush()


  1. Which of these method(s) is/are used for writing bytes to an outputstream?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    write() and print() are the two methods of OutputStream that are used for printing the byte data.



  1. Which method can be used to check fileAccessiblity?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    File accessibilty can be checked using isReadable(Path), isWritable(Path), and isExecutable(Path).