In the programming, it is usually encountered with a small problem that converts the multi-man floating point nutrient string into a Double type. The following example shows:
Import java.text. *; ... try {string S1 = "1,000.00"; string S2 = "100.00";
Double D1 = new decimalformat (). Parse (S1) .doublevalue (); double d2 = new decimalformat (). Parse (s2) .doublevalue (); system.out.println (d1); system.out.println (d2 ); (ParseException PE) {system.out.println (pe.getMessage ()); pe.printstacktrace ();
The output is: 1000.00100.00
Ha ha ~~ This is what I want.