U1. Files and Serialization

Quiz
•
Computers
•
University
•
Easy

Héctor L
Used 19+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the key difference between text and binary files?
Text files store data as bytes, while binary files store characters.
Text files are human-readable, while binary files are not.
Binary files are faster to read, while text files are less efficient.
Binary files cannot be opened on certain operating systems.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following classes is used to read lines from a text file in Java?
FileWriter
BufferedReader
DataInputStream
ObjectInputStream
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the code in the image do?
Write the string "Hello, world!" to output.txt.
Throw an exception because BufferedWriter cannot be closed before FileWriter.
Write a single character 'H' to output.txt.
Create the file output.txt but not write anything to it.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method in FileInputStream is used to read a single byte from a binary file?
readLine()
read()
readByte()
getByte()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Serialization in Java requires which interface to be implemented?
Serializable
Serializate
IOSerializate
IOSerializable
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What exception is thrown if a file does not exist when using FileInputStream?
NullPointerException
FileNotFoundException
IOException
StreamCorruptedException
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following line of code do?
output.writeObject(object);
Writes a character to the file.
Writes an object to the file after converting it to bytes.
Saves a text representation of the object.
Appends an object to an existing file.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Adobe Animate 2020 Quiz 2

Quiz
•
University
14 questions
Solar2D Review

Quiz
•
10th Grade - University
12 questions
Android App Development

Quiz
•
University
20 questions
Serialización y JComboBox

Quiz
•
University
18 questions
U3.1. Connections (JDBC)

Quiz
•
University
20 questions
Data Analyst Mini Bootcamp

Quiz
•
University
20 questions
Translators and Computing Languages: GCSE 9-1

Quiz
•
9th Grade - University
22 questions
The Internet

Quiz
•
University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University