How do I create a java.nio.Path?

The following code snippet show you how to create a Path. A Path (java.nio.Path) in an interface that represent a location in a file system, such as C:\Windows\System32 or /usr/bin.

To create a Path we can use the java.nio.Paths.get(String first, String... more) methods. Below you can see how to create a Path by passing only the first string and by passing a first string plus some varargs string.