返回一个值,该值指示指定的 String 对象是否出现在此字符串中。
String source = "abcd";
if(source.contains("a")){
System.out.println(是);
}else{
System.out.println(否);
}
返回一个值,该值指示指定的 String 对象是否出现在此字符串中。
String source = "abcd";
if(source.contains("a")){
System.out.println(是);
}else{
System.out.println(否);
}