question: public StringBuffer numberToString ( final String strNumberToConvert ) { String strNumber = "" , signBit = "" ; if ( strNumberToConvert . startsWith ( "-" ) ) { strNumber = "" + strNumberToConvert . substring ( 1 , strNumberToConvert . length ( ) ) ; signBit = "-" ; } else strNumber = "" + strNumberToConvert ; final DecimalFormat dft = new DecimalFormat ( "##############0.00" ) ; final String strtemp = "" + dft . format ( Double . parseDouble ( strNumber ) ) ; StringBuffer strbNumber = new StringBuffer ( strtemp ) ; final int intLen = strbNumber . length ( ) ; for ( int i = intLen - 6 ; i > 0 ; i = i - 2 ) strbNumber . insert ( i , ',' ) ; if ( signBit . equals ( "-" ) ) strbNumber = strbNumber . insert ( 0 , "-" ) ; return strbNumber ; }
target:  function to format amount into to Indaian rupees format