JAVA语言中 String类的应用(下)

1.字符串查找   对应代码如下:  public class Test{ public static void main(String[] args){ String str1 = "hello world world"; System.out.println(str1.contains("llo"));//查找对应字符内是否包含所需要的子字符串 System.
相关文章
相关标签/搜索