Data Type Java Tutorial

public class MainClass
{
   public static void main( String args[] )
   {
      String letters = "abcdefghijklmabcdefghijklm";
      
      System.out.printf( 
         "'c' is located at index %d\n", letters.indexOf( 'c' ) );
      System.out.printf(
         "'a' is located at index %d\n", letters.indexOf( 'a', 1 ) );
      System.out.printf(
         "'$' is located at index %d\n\n", letters.indexOf( '$' ) );
   }
}
'c' is located at index 2
'a' is located at index 13
'$' is located at index -1