点击运行
public class Main { public static void main(String args[]) { String Str = new String("Welcome to jiyik.com"); String SubStr1 = new String("jiyik"); System.out.println("Found Index :" + Str.indexOf( SubStr1 )); } }
运行结果 :
正在执行...