关于正则表达式,请大家伙儿看看

关于正则表达式,请大家看看String strPLNZXCZXCZXCPattern pat Pattern.compile(PLN)Matcher mat

关于正则表达式,请大家看看
    String str="PLNZXCZXCZXC";
    Pattern pat = Pattern.compile("PLN");   
Matcher mat = pat.matcher(str);
if (mat.find()){
if (mat.group() == "PLN"){
System.out.print(mat.group());
}

}
为什么System.out.print(mat.group()) 不执行?mat.group我打印是PLN mat.group() == "PLN"就是flase
WHY?
[解决办法]
字符串比较要用equals
mat.group() == "PLN"
改为
mat.group().equals("PLN")