September 2019
Intermediate to advanced
816 pages
18h 47m
English
If all we want is a lexicographical comparison of the paths, then we can rely on the Path.compareTo() method (this can be useful for sorting).
This method returns the following information:
int path1compareToPath2 = path1.compareTo(path2); // 0int path1compareToPath3 = path1.compareTo(path3); // 24int path2compareToPath3 = path2.compareTo(path3); // 24
Note that you may obtain different values than in the preceding example. Furthermore, in your business logic, it is important to rely on their meaning and ...