public static String intToString(int value,int nChars){
  String strValue=Integer.toString(value);
  StringBuilder strBuf=new StringBuilder(nChars);
  for (int i=strValue.length(); i < nChars; i++) {
    strBuf.append('0');
  }
  strBuf.append(strValue);
  return strBuf.toString();
}

public static String intToString ( int value , int nChars ) { String strValue = Integer . toString ( value ) ; StringBuilder strBuf = new StringBuilder ( nChars ) ; for ( int i = strValue . length ( ) ; i < nChars ; i ++ ) { strBuf . append ( '0' ) ; } strBuf . append ( strValue ) ; return strBuf . toString ( ) ; }
method inttostring . converst an integer to nchars characters
