Java Readers and Writers  «Prev 


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