String.indexOf(String str, int fromIndex)

解决方案 »

  1.   

    String s="jvd8f89ejfd";
    if(s.indexOf("8f")!=-1)
    System.out.println("yes");
      

  2.   

    int fromIndex这个参数的意义?
      

  3.   

    If a character with value ch occurs in the character sequence represented by this String object at an index no smaller than fromIndex, then the index of the first such occurrence is returned.
      

  4.   

    int fromIndex参数指可选的整数值,指出在 String 对象内开始查找的索引。如果省略,则从字符串的开始处查找