Java String lastIndexOf() fromIndex Java String lastIndexOf(String str) 方法 Java String length() 方法 Java String lastIndexOf() fromIndex import java.io.*; public class Test { public static void main(String args[]) { String Str = new String("Welcome to codingdict.com"); String SubStr1 = new String("Tutorials" ); System.out.print("Found Last Index :" ); System.out.println( Str.lastIndexOf( SubStr1, 15 )); } } Java String lastIndexOf(String str) 方法 Java String length() 方法