Code: Select all
Path p1 = Paths.get("\\personal\\readme.txt");
Path p2 = Paths.get("\\index.html");
Path p3 = p1.relativize(p2);
System.out.println(p3);
However I believe (and so does IntelliJ) that it should be ..\index.html (which is not an option)