public static String encode(char[] chars){
  StringBuffer sbuf=new StringBuffer();
  int len=chars.length;
  for (int i=0; i < len; i++) {
    int ch=chars[i];
    append(sbuf,ch);
  }
  return sbuf.toString();
}

public static String encode ( char [ ] chars ) { StringBuffer sbuf = new StringBuffer ( ) ; int len = chars . length ; for ( int i = 0 ; i < len ; i ++ ) { int ch = chars [ i ] ; append ( sbuf , ch ) ; } return sbuf . toString ( ) ; }
description of the method
