From http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html:
\\Z The end of the input but for the fin
Just checked it. It looks like when Matcher.matches() is invoked(like in your code, behind the scenes), \Z behaves like \z. However, when Matcher.find() is invoked, they behave differently as expected. The following returns true:
Pattern p = Pattern.compile("StackOverflow\\Z");
Matcher m = p.matcher("StackOverflow\n");
System.out.println(m.find());
and if you replace \Z with \z it returns false.
I find this a little surprising...