About Question com.enthuware.ets.scjp.v6.2.116 :
Posted: Tue Jan 17, 2012 11:35 am
Shouldn't it be \\d\\d instead of \d\d in the question?
Java Certification Resources and Java Discussion Forum
https://enthuware.com/forum/
Code: Select all
Pattern p = Pattern.compile(args[0]);
Matcher m = p.matcher(args[1]);
boolean b = false;
while(b = m.find())
{
System.out.println(m.start()+" "+m.group());
}
Code: Select all
Pattern p = Pattern.compile(args[0]);
Matcher m = p.matcher(args[1]);
while(m.find())
{
System.out.println(m.start()+" "+m.group());
}