Matcher?m1?=?p1.matcher(content);
System.out.println(m1.find());//true
boolean?findddd?=?m1.find();
System.out.println(findddd);//false
if(m1.matches()?==?true)?{
2 回答
驅虎吞狼獵
TA貢獻47條經驗 獲得超39個贊
Matcher?m1?=?p1.matcher(content);
System.out.println(m1.find());//這里是第一次調用
boolean?findddd?=?m1.find();//第二次調用
System.out.println(findddd);//第二次調用的返回值
if(m1.matches()?==?true)?{兩次結果分別是兩次調用的結果,如果輸出的都是同一次,結果肯定是相同的。
但是這幾行的代碼看不到find()方法體里具體是什么內容,也就沒有辦法判斷問題具體出在什么地方。
可以看一下源碼,自己判斷一下
添加回答
舉報
0/150
提交
取消
