1Z0-805 · Question #82
Which two scenarios throw FileSystemNotFoundException when the paths.get(URI) method is invoked?
The correct answer is B. When the provider identified by the URI'S scheme component is not installed D. When the file system identified by the uri does not exist and cannot be created automatically. The file system, identified by the URI, does not exist and cannot be created automatically, or the provider identified by the URI's scheme component is not installed. Note: This method converts the given URI to a Path object. It throws the following exceptions…
Question
Which two scenarios throw FileSystemNotFoundException when the paths.get(URI) method is invoked?
Options
- AWhen preconditions on the uri parameter do not hold
- BWhen the provider identified by the URI'S scheme component is not installed
- CWhen a security manager is installed and it denies an unspecified permission to acess the file system.
- DWhen the file system identified by the uri does not exist and cannot be created automatically
- EWhen the path string cannot be converted to a Path
How the community answered
(40 responses)- A5% (2)
- B80% (32)
- C13% (5)
- E3% (1)
Explanation
The file system, identified by the URI, does not exist and cannot be created automatically, or the provider identified by the URI's scheme component is not installed. Note: This method converts the given URI to a Path object. It throws the following exceptions: *IllegalArgumentException - if preconditions on the uri parameter do not hold. The format of the URI is provider specific. *FileSystemNotFoundException - The file system, identified by the URI, does not exist and cannot be created automatically, or the provider identified by the URI's scheme component is not installed *SecurityException - if a security manager is installed and it denies an unspecified permission to access the file system
Topics
Community Discussion
No community discussion yet for this question.