private String printLong(long l){
  String result;
  String str;
  int i;
  int count;
  str=Long.toString(l);
  result="";
  count=0;
  for (i=str.length() - 1; i >= 0; i--) {
    count++;
    result=str.charAt(i) + result;
    if ((count == 3) && (i > 0)) {
      result="," + result;
      count=0;
    }
  }
  return result;
}

private String printLong ( long l ) { String result ; String str ; int i ; int count ; str = Long . toString ( l ) ; result = "" ; count = 0 ; for ( i = str . length ( ) - 1 ; i >= 0 ; i -- ) { count ++ ; result = str . charAt ( i ) + result ; if ( ( count == 3 ) && ( i > 0 ) ) { result = "," + result ; count = 0 ; } } return result ; }
adds thousand ' s - separators to the number
