contains (判断 s 是否包含 ss ,包含返回true,不包含返回false)
String s = "你好!";
String ss="你";
boolean ii= s.contains(ss);
if(ii==true){
System.out.println("成功");
}else if(ii==false){
System.out.println("失败");
}
转载自:https://blog.csdn.net/luhanqiang/article/details/78021068