11. Which method is used to find the next subsequence that matches the pattern in a regular expression in Java? A. `contains()` B. `search()` C. `find()` D. `match()` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
12. In a regular expression, what does the metacharacter `?` represent? A. One or more occurrences of the preceding character or group B. Zero occurrences of the preceding character or group C. A fixed number of occurrences of the preceding character or group D. Zero or one occurrence of the preceding character or group Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
13. Which class is used to represent a compiled regular expression in Java? A. `Pattern` B. `Matcher` C. `Regex` D. `String` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
14. 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 & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
15. In a regular expression, what does the metacharacter `|` represent? A. Zero or more occurrences of the preceding character or group B. A word boundary C. Alternation, allowing a choice between two or more patterns D. A digit Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
16. In a regular expression, what does the metacharacter `d` represent? A. Any special character B. Any digit C. Any whitespace character D. Any special character Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
17. Which method is used to replace text that matches a regular expression in Java? A. `replaceFirst()` B. `findAndReplace()` C. `replaceAll()` D. `replace()` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
18. What does the character class `[A-Z]` match in a regular expression? A. Any lowercase letter B. Any digit C. Any special character D. Any uppercase letter Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
19. In a regular expression, what does the metacharacter `s` represent? A. Any whitespace character B. Any letter C. Any digit D. Any special character Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
20. Which method is used to split a string using a regular expression in Java? A. `substring()` B. `join()` C. `concat()` D. `split()` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board