1.

Object of which class is used to compile regular expression?(a) Pattern class(b) Matcher class(c) PatternSyntaxException(d) None of the mentionedThis question was posed to me in a national level competition.My question is based upon Regular Expression topic in division Regular Expressions of Java

Answer»

The correct answer is (a) Pattern class

Easiest EXPLANATION: object of Pattern class can represent COMPILED regular EXPRESSION.



Discussion

No Comment Found

Related InterviewSolutions