public static boolean equals(CharSequence a,CharSequence b){
  if (a.length() != b.length()) {
    return false;
  }
  int length=a.length();
  for (int i=0; i < length; i++) {
    if (a.charAt(i) != b.charAt(i)) {
      return false;
    }
  }
  return true;
}

public static boolean equals ( CharSequence a , CharSequence b ) { if ( a . length ( ) != b . length ( ) ) { return false ; } int length = a . length ( ) ; for ( int i = 0 ; i < length ; i ++ ) { if ( a . charAt ( i ) != b . charAt ( i ) ) { return false ; } } return true ; }
compares two character sequences for equality .
