// This code returns 6: // the index relative to the start of the origingal String, // not relative to the substring searched starting at offset 2 out.println( "deccccdefgh".indexOf( "de", 2 ) );