Examveda
Examveda

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

D. It counts the number of matches

Answer: Option C


This Question Belongs to Java Program >> Regular Expressions In Java

Join The Discussion

Related Questions on Regular Expressions in Java