Reputation: 8356
Almost all file I/O operations in my Java code uses java.nio.*
. While debugging a piece of code today, however, I noticed that the debugger (Intellij IDEA 14) was showing the following piece of information for a java.nio.file.Path
instance:
Why is java.nio.file.Path
object being shown as sun.nio.fs.UnixPath
object in the debugger? What is the difference between these two classes?
Upvotes: 3
Views: 5622
Reputation: 115338
java.nio.file.Path
is an interface, sun.nio.fs.UnixPath
is its concrete implementation in your environment. If for example you run your code on Windows you see sun.nio.fs.WindowsPath
.
Upvotes: 9