protected boolean same(final char[] word,final int length,final CharSequence typedWord){
  if (typedWord.length() != length) {
    return false;
  }
  for (int i=0; i < length; i++) {
    if (word[i] != typedWord.charAt(i)) {
      return false;
    }
  }
  return true;
}

protected boolean same ( final char [ ] word , final int length , final CharSequence typedWord ) { if ( typedWord . length ( ) != length ) { return false ; } for ( int i = 0 ; i < length ; i ++ ) { if ( word [ i ] != typedWord . charAt ( i ) ) { return false ; } } return true ; }
compares the contents of the character array with the typed word and returns true if they are the same .
