Search Header Logo

Quiz 2: File Handling

Authored by MADHURI KETHARI

Professional Development

Professional Development

Used 5+ times

Quiz 2: File Handling
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following exception is thrown in case when the file specified for writing is not found?

FileNotFoundException

IOException

FileInputException

FileException

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following method is used to read from file?


readFile()

get()

read()

scanf()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following value is returned by read() method when end of file (EOF) is encountered?


1

-1

0

Null

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the follwing methods is used to write() into a file?


writeFile()

put()

write()

print()


5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following packages contain classes and interfaces used for input & output operations of file?

java.util


java.lang


6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these class is not a member class of java.io package?


FileReader


FileWriter


File

String

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following class is not related to input and output stream in terms of functioning?


File

FileReader

FileWriter

InputStream

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?