Here's an example:
Pattern p = Pattern.compile("\\Gfoo");
Matcher m = p.matcher("foo foo");
String trueFalse = m.find() + ", " + m.find();
System.out.println(trueFalse);
Pattern p1 = Pattern.compile("foo");
Matcher m1 = p1.matcher("foo foo");
String trueTrue = m1.find() + ", " + m1.find();
System.out.println(trueTrue);