Java
Programming and Technical
Programming
What is the output of the following program?
import java.util.regex.*;
class Test
{
public static void main(String args[])
{
Pattern p = Pattern.compile(".ech");
Matcher m = p.matcher("tech");
boolean b = m.matches();
System.out.println(b);
}
}
A. true
B. false
C. Compilation Error
D. Runtime Error
Read Solution (Total 1)
-
- B. False
.ech is not present in tech - 1 year agoHelpfull: Yes(0) No(0)
Java Other Question