How many times it returns true

Report a typo

Given a fragment of a program with a regex:

String str = "Aaab 123 ab 787 abba 12ab 55AB";

Pattern pattern = Pattern.compile("[ab]+");

Matcher matcher = pattern.matcher(str);

How many times will the invocation of matcher.find() return true?

Select one option from the list
___

Create a free account to access the full topic