Path is a sequence of directory names, optionally followed by a file name. The first component of a path may be a root component such as
C:\. The permissible root components depend on the file system. A path that starts with a root component is absolute. Otherwise, it is relative. For example, here we construct an absolute and a relative path. For the absolute path, we assume a computer running a UNIX-like file system.
Path absolute = Paths.get("/home", "cay"); Path relative = Paths.get("myprog", "conf", "user.properties");
Paths.get method receives one or more strings, which it joins with the path separator of the default file system (
/ for a UNIX-like file system,
\ for Windows). ...