I am wondering why the results of the java regex pattern.matcher() and pattern.matches() differ when provided the same regular expression and same string
matches tries to match the expression against the entire string. Meaning, it checks whether the entire string is a patern or not. conceptually think it like this, it implicitly adds a ^ at the start and $ at the end of your pattern.
For, String str = "hello+", if you want matches() to return true, you need to have pattern like ".\+."
I hope this answered your question.