JavaDeploy
SiteMap
Readers Writers
Java Streams
Java Programming
Java Language
Java Readers and Writers
«Prev
Java Readers Writers
Java Files
Java File Class
File Listing Information
Listing Path Information
Determine File Format
move, rename, delete Files
Creating Directories Paths
Listing Directories Paths
Random Access Files
Positioning RandomAccess I/O
File Dialogs
Choosing File Dialog
Create FileDialog Box
Default Directory Java
Choosing Files
Get Directory Filename
Java Filename Filters
fileDumper Program Project
File Dialog Box Acceptance
Reading Writing Text
Java Character Sets
Java Reader Writer
Java Reader Class
Read TextFile Print
Readers Writers
Line Number Reader
Java-IO Mini-API
Java Files and Dialogs - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
When does the
getParent()
method in the
File
class return
null
?
Please select the best answer.
A.
When the file is a directory
B.
When the file has no parent
C.
When the file is a shortcut, symbolic link, or alias
D.
Never. If there's a problem,
getParent()
throws an
IOException
E.
When the
getParent()
method is overloaded.
2.
To implement the
FilenameFilter
interface you must provide an implementation for which of the following methods?
Please select the best answer.
A.
filter()
B.
show()
C.
display()
D.
open()
E.
accept()
3.
Java provides a means of accomplishing all of the actions listed below except one. Which action cannot be accomplished by using Java?
Please select the best answer.
A.
Create a new file
B.
Append data to an existing file
C.
Create a new directory
D.
Create a shortcut to a file
E.
Move a file to its parent directory
Your score is 0.0
Submit
Quiz Explanation