title: Glob pattern using getPathMatcher
body: <p>From the book of "Kathy Sierra Bert Bates" for OCP exam I found the following code</p>
  
  <pre><code>public class FileTest {
  
      public static void matches(Path path, String glob){
          PathMatcher matcher = FileSystems.getDefault().getPathMatcher(glob);
          System.out.println(matcher.matches(path));
      }
      public static void main(String[] args) throws IOException {
          Path path = Paths.get("/com/java/One.java");
          matches(path, "glob:*.java");
          matches(path, "glob:**/*.java");
          matches(path, "glob:*");
          matches(path, "glob:**");
  
      }
  }
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>false
  true
  false
  true
  </code></pre>
  
  <p>I can not understand the output clearly. Would any one explain me. let me know my example what is crossing directory boundaries.
  Thanks
  Rocky</p>