Java Programming
primer-original-v2mediumJava Programming05 Regular Expressionprimer-original-v2

Consider the below statements. Statement 1 : Matcher class interprets the pattern in a String Statement 2 : Matcher class matches the regular expression against the text provided Which of the following is true?

Answer options

A
Statement 1 alone is correct.
B
Both Statement 1 and 2 are correct
C
Both Statement 1 and 2 are incorrect.
D
Statement 2 alone is correct.

Correct answer: Both Statement 1 and 2 are correct

Explanation

Quick AnswerThe correct answer is Both Statement 1 and 2 are correct because it directly addresses the core logic of Java Programming.

This question has been retained as-is due to its unique context.

Related Java Programming questions

Practice more Java Programming questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.