Vidyalelo
Java Programming · Q21

Java Regular Expressions

Programming · Java Programming · question 21

Q21

What is the purpose of the `group()` method in Java regular expressions?

A.
It compiles a regular expression
B.
It checks if a string matches the pattern
C.
It returns the matched subsequence
Answer
D.
It counts the number of matches

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board