实现方法 contains, 能够判定字符串中是否包含子串
public class Test {
public static void main(String[] args) {
String str = "helloword";
System.out.println(str.contains("hello"));
System.out.println(str.contains("helow"));
}
}
实现方法 contains, 能够判定字符串中是否包含子串
public class Test {
public static void main(String[] args) {
String str = "helloword";
System.out.println(str.contains("hello"));
System.out.println(str.contains("helow"));
}
}