Java File Handling Quiz

Java File Handling Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

ZOOM QUIZ

ZOOM QUIZ

1st - 12th Grade

10 Qs

quizz tkinter

quizz tkinter

11th Grade - University

20 Qs

loop while/do while

loop while/do while

7th - 12th Grade

10 Qs

ICT WEBINAR QUIZ

ICT WEBINAR QUIZ

KG - Professional Development

20 Qs

EMPTECH L4 Q3

EMPTECH L4 Q3

12th Grade

10 Qs

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

IT (data, viruses and more)

IT (data, viruses and more)

8th Grade - Professional Development

20 Qs

Java File Handling Quiz

Java File Handling Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Geoff Ewart

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which class in Java is used for file handling?

BufferedReader

File

FileReader

Scanner

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the createNewFile() method return if the file is successfully created?

void

false

null

true

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to check if a file is writable?

write()

isWritable()

canWrite()

canRead()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What exception does the createNewFile() method throw if an error occurs?

FileAlreadyExistsException

NullPointerException

IOException

FileNotFoundException

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to delete a file in Java?

erase()

delete()

remove()

clear()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of the length() method in the File class?

float

int

long

double

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns the absolute pathname of a file?

getAbsolutePath()

getPath()

getFullPath()

getDirectory()

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?