public boolean equals(String str){
  if (str == null)   return false;
  if (_length != str.length())   return false;
  for (int i=_length, j=_offset + _length; --i >= 0; ) {
    if (_array[--j] != str.charAt(i))     return false;
  }
  return true;
}

public boolean equals ( String str ) { if ( str == null ) return false ; if ( _length != str . length ( ) ) return false ; for ( int i = _length , j = _offset + _length ; -- i >= 0 ; ) { if ( _array [ -- j ] != str . charAt ( i ) ) return false ; } return true ; }
compares this character array against the specified string . in case of equality , the chararray keeps a reference to the string for future comparisons .
