/** <Br/> * returns the number of digits after the specified decimal point to the parameter. <br/> * @ Param sourcedata indicates the metadata to be acquired. <br/> * @ Param Str optional format (mainly used "#. 0 "format, which is the first digit after the decimal point ;"#. 00 "indicates the second decimal point, and so on) <br/> * @ return the rounded data <br/> */<br/> Public static double getdouble (double sourcedata, string SF) <br/>{< br/> decimalformat df = new decimalformat (SF); <br/> string STR = DF. format (sourcedata); <br/> return double. parsedouble (STR ); <br/>}</P> <p>/** <br/> * returns the rounding of the digit after the specified decimal point to the parameter <br/> * @ Param sourcedata <br/> * @ Param a The number of digits after the decimal point (for example: 10: one digit after the decimal point; 100: the second digit after the small data, and so on) <br/> * @ return the rounded data <br/> */<br/> Public static float getfloatround (double sourcedata, int) <br/> {<br/> int I = (INT) math. round (sourcedata * A); // place a after the decimal point, move forward and rounding <br/> float F2 = (float) (I/(float) ); // restore the digit after the decimal point <br/> return F2; <br/>}