Which method or methods should you implement to create your own implementation of the java.nio.file.PathMatcher interface?
A.
matches(Path)
B.
matches(Path),
fails(Path)
C.
matches(Path) ,
fails(Path),
enable(boolean)
D.
matches(Path) ,
fails(Path) ,
setPreferred (String)
Explanation:
The interface PathMatcher is an interface that is implemented by objects that perform match operations on paths.
The single method for this interface ismatches:
boolean matches(Path path)
Tells if given path matches this matcher’s pattern.
Parameters:
path – the path to match
Returns:
true if, and only if, the path matches this matcher’s pattern.
Reference: java.nio.file.PathMatcher