Java tutorial
public class MainClass { public static void main(String[] arg) { String str = "abcdeabcdef"; int index = 0; index = str.lastIndexOf("ab"); System.out.println(index); } }