1import java.util.*;
2public class StringIndexOfMethodExample
3{
4 public static void main(String[] args)
5 {
6 String strInput = new String("hello world core java");
7 String strSub = new String("core");
8 System.out.print("Index found: " );
9 System.out.println(strInput.indexOf(strSub, 3));
10 }
11}
12
13
14