Course: Easy-to-follow Java programming
The quiz questions
Answer the questions below to review what you have learned in Video 15. You will
find the right answers after the questions in the solution part.
1. Complete the sentences!
All files contain [ …….......... ] that are binary data for [ …….......... ] bits (i.e. binary
digits). You can [ …….......... ] the content of a file as [ …….......... ] if you use a code
table for translating between the two. Such code tables are e.g. ASCII, Unicode,
UTF-8… Every character can be represented by [ …….......... ] characters.
Possibilities: [bytes], [characters], [blocks], [8], [4], [16], [interpret], [transform],
[1 or more], [exactly 1], [exactly 2], [2 or 4]
2. What is the ending of the classes in each cell?
Input Output
Bytes
Characters
3. Try-with-resources structure is…
…good for handling closable resources so that they will be closed either
there is an exception or not.
…good for handling exception with manual work.
…an improved try-catch structure in which you can add an auxilliary object
which defines how to handle the exception.
…good for handling files.
Duckademy IT courses – www.duckademy.com
4. Pattern is…
…a general reusable solution to an exceptional problem withing a given
context in software design.
…a creative new solution to a commonly occurring problem within a given
context in software design.
…a creative new solution to an exceptional problem within a given context
in software design.
…a general reusable solution to a commonly occurring problem within a
given context in software design.
5. What is a DAO?
Stands for Data Access Object.
Stands for Dynamic Access Object.
DAO is how you have to handle CSV-files.
DAO is for handling different persistent storages (e.g. CSV-files, normal
files…).
DAO is a (design) pattern.
DAO is a class to handle INI-files.
Duckademy IT courses – www.duckademy.com
----------------------------------------------------------------------------------------------------------------
The answers
1. Complete the sentences!
All files contain [ bytes ] that are binary data for [ 8 ] bits (i.e. binary digits). You can
[ interpret ] the content of a file as [ characters ] if you use a code table for
translating between the two. Such code tables are e.g. ASCII, Unicode, UTF-8…
Every character can be represented by [ 1 or more ] characters.
Possibilities: [bytes], [characters], [blocks], [8], [4], [16], [interpret], [transform],
[1 or more], [exactly 1], [exactly 2], [2 or 4]
2. What is the ending of the classes in each cell?
Input Output
Bytes …InputStream …OutputStream
Characters …Reader …Writer
3. Try-with-resources structure is…
X …good for handling closable resources so that they will be closed
either there is an exception or not.
…good for handling exception with manual work.
…an improved try-catch structure in which you can add an auxilliary object
which defines how to handle the exception.
X …good for handling files.
4. Pattern is…
…a general reusable solution to an exceptional problem withing a given
context in software design.
…a creative new solution to a commonly occurring problem within a given
context in software design.
…a creative new solution to an exceptional problem within a given context
in software design.
X …a general reusable solution to a commonly occurring problem
within a given context in software design.
Duckademy IT courses – www.duckademy.com
5. What is a DAO?
X Stands for Data Access Object.
Stands for Dynamic Access Object.
DAO is how you have to handle CSV-files.
X DAO is for handling different persistent storages (e.g. CSV-files,
normal files…).
X DAO is a (design) pattern.
DAO is a class to handle INI-files.
Duckademy IT courses – www.duckademy.com