String str="123abc456";
if(str.indexOf("abc")!=-1){
System.out.println("包含");
}else{
System.out.println("不包含");
}
String str="123abc456";
if(str.indexOf("abc")!=-1){
System.out.println("包含");
}else{
System.out.println("不包含");
}