nerdexam
Oracle

1Z0-805 · Question #75

Which method or methods should you implement to create your own implementation of the java.nio.file.PathMatcher interface?

The correct answer is A. matches(Path). 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. path - the path to match true if, and…

Java I/O Fundamentals

Question

Which method or methods should you implement to create your own implementation of the java.nio.file.PathMatcher interface?

Options

  • Amatches(Path)
  • Bmatches(Path),
  • Cmatches(Path) ,
  • Dmatches(Path) ,

How the community answered

(26 responses)
  • A
    81% (21)
  • B
    12% (3)
  • C
    4% (1)
  • D
    4% (1)

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. path - the path to match true if, and only if, the path matches this matcher's pattern.

Topics

#PathMatcher#NIO.2#interface implementation#matches method

Community Discussion

No community discussion yet for this question.

Full 1Z0-805 Practice