Data Type Java Tutorial

public class MainClass
{
   public static void main( String args[] )
   {
      String letters = "abcdefghijklmabcdefghijklm";
      System.out.printf( "\"def\" is located at index %d\n", 
          letters.indexOf( "def" ) );
       System.out.printf( "\"def\" is located at index %d\n",
          letters.indexOf( "def", 7 ) );
       System.out.printf( "\"hello\" is located at index %d\n\n",
          letters.indexOf( "hello" ) );
   }
}
"def" is located at index 3
"def" is located at index 16
"hello" is located at index -1