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?
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?
Create a free account to access the full topic