
Java File hanteering
Authored by Tina Niekerk
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does the Path class do?
Creates objects that contain information about files and directories.
Deletes files and directories.
Copies files from one directory to another.
Renames files.
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does the Files class do?
Used to perform operations on files and directories.
Creates new files.
Reads data from files.
Writes data to files.
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does the getNameCount() method return?
The number of name elements in the Path.
The file name.
The directory name.
The full path.
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does the getName(int) method do?
Returns name in the position of the Path specified by the integer parameter.
Returns the file name.
Returns the directory name.
Returns the number of name elements.
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the syntax to check access for a file?
filepath.getFileSystem().provider().checkAccess();
filepath.checkAccess();
checkAccess(filepath);
AccessMode.check(filepath);
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does the READ argument do in checkAccess()?
Checks if the file exists and permission to read exists
Checks if the file exists and permission to write exists
Checks if the file exists and permission to execute exists
Checks if the file exists
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What happens if the file cannot be used for the application?
An IOException is thrown
The program continues without error
The file is deleted
The file is created
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
20 questions
Review Quiz (Chapter 3&4)
Quiz
•
University
20 questions
C Programming Unit-1 Test-2
Quiz
•
University
10 questions
C++ Array Quiz
Quiz
•
University
10 questions
Microsoft Word
Quiz
•
University
20 questions
Java Quiz 1
Quiz
•
University
15 questions
Computer Applications in Banking and Finance Quiz
Quiz
•
University
10 questions
Software Testing
Quiz
•
University
20 questions
ประกอบคอมพิวเตอร์
Quiz
•
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade