Java IO Tutorial - Java Path.resolve(Path other)


Path.resolve(Path other) has the following syntax.

Path resolve(Path other)


In the following code shows how to use Path.resolve(Path other) method.

/*from www.  j  a v a 2 s .  co  m*/
import java.nio.file.Path;
import java.nio.file.Paths;

public class Main {

  public static void main(String[] args) {
     Path path = Paths.get("C:/home/./music/users.txt");
     Path path1 = Paths.get("./music/users.txt");


The code above generates the following result.