Guest User

Untitled

a guest
May 27th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Path p1 = Paths.get("/Users/jack/Documents/text1.txt");
  2. Path p2 = Paths.get("/Users/jack/text2.txt");
  3. Path result1 = p1.resolve(p2);
  4. Path result2 = p1.relativize(p2);
  5.  
  6. System.out.println("result1: "+result1);
  7. System.out.println("result2: "+result2);
  8.  
  9. result1: /Users/jack/text2.txt<br>
  10. result2: ../../text2.txt
Add Comment
Please, Sign In to add comment