Examveda

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

A. It splits the input into an array of substrings

B. It replaces the matched text with a new text

C. It searches for the first occurrence of the pattern

D. It checks if the entire input sequence matches the pattern

Answer: Option D


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

Join The Discussion

Related Questions on Regular Expressions in Java