Chapter 9 I/O and NIO page 515
At the bottom of the page, in the source code sample, inside the overriding visitFile method:
It is intended to filter all .class files and remove them, isn't it?
endsWith(String other) method from Path interface API says:
"On UNIX for example, the path "foo/bar" ends with "foo/bar" and "bar". It does not end with "r" or "/bar". Note that trailing separators are not taken into account, and so invoking this method on the Path"foo/bar" with the String "bar/" returns true."