题目内容
给出下列【代码】注释标注的代码的输出结果。import java.util.regex.*;public class E {public static void main(String args[ ]) {String s = "we are students(we are from Beijing)";String regex = "[a-zA-Z]+";Pattern p =Pattern.compile(regex);Matcher m =p.matcher(s);int count =0;String item ="";while(m.find()) {item = m.group();count ++;}System.out.printf("%d:%s",count,item);//【代码】}}
查看答案
搜索结果不匹配?点我反馈