Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Programmer Certification (OCPJP)
Chapter 9 Paths vs FileSystems (URI resource)
posted 4 months ago
I've been reading the OCJP 8 (
OCP 8 Programmer II Study Guide written by Jeanne Boyarsky and Scott Selikoff).
I'm in the middle of Chapter 9. And i've noticed strange thing (for me).
section they wrote:
Paths.get( new URI("http://www.selikoff.net"));
and after that in
Accessing the Underlying FileSystem Object
section they introduced:
FileSystem fileSystem = FileSystems.getFileSystem( new URI("http://www.selikoff.net"));
And both generate
This is my code:
FileSystem fileSystem = FileSystems.getFileSystem( new URI("http://www.selikoff.net")); Path path = fileSystem.getPath("duck.txt");
Why does it throw an exception? I've found this topic
but it's not clear.
I cannot find the solution why this code doesnt work. What's the concrete reason?
Don't get me started about those stupid
Boost this thread!
Passed OCP Java SE 8 Upgrade Exam (1Z0-813) with 91%
OCJP Wall Of Fame
OCJP 1Z0-809 preparation