
Java File Handling Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Geoff Ewart
Used 6+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Dasar Desain Grafis
Quiz
•
12th Grade - University
10 questions
Review I-PM Ujikom Multimedia
Quiz
•
12th Grade
20 questions
Google SketchUp Tool
Quiz
•
KG - University
20 questions
REMEDI PAS - DESAIN DAN KOMP. GRAFIS
Quiz
•
12th Grade
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
15 questions
tik kelas 7
Quiz
•
1st Grade - University
16 questions
Digital Icons
Quiz
•
12th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
