Question
Consider the following Java code: import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegexGroup { public static void main(String[] args) { String text = "Date: 2023-10-26, Time: 14:30"; Pattern pattern = Pattern.compile("(\\d{4})-(\\d{2})-(\\d{2})"); Matcher matcher = pattern.matcher(text); if (matcher.find()) { System.out.println(matcher.group(0) + " | " + matcher.group(1)); } else { System.out.println("No match"); } } } What will be the output of this program?
More IT Operating System Questions
- Which of the following best describes Cyclomatic Complexity of a program?
- Length of IPv6 address is _____ bits.
- Which statement is FALSE for PLL used for demodulation of FM?
- Which is best fit for blank space 16?
- Consider the following Java code snippet: import java.util.PriorityQueue; public class HeapQuestion9 { public static void main(Strin...
- Which refers to the creation of Internet Protocol (IP) packets with a false source IP address to impersonate another computer system.
- What is the primary function of cache memory in a computer system?
- Which of the following is a client side scripting language?
- A C function print_matrix(int rows, int cols, int matrix[rows][cols]) is designed to print a matrix. #include void print_matrix(int rows, int cols, ...
- What is the primary function of the Program Counter (PC) in a CPU?
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)