(permanent population urbanization rate (25) + permanent population quantity (0), the actual service population (0)) AVG
CodePudding user response:
Take Numbers using regular expressions,Urbanization rate will have a decimal point?
CodePudding user response:
This is expected to be in a stack of storage structure and implementation, and then every time I met the bracket was out of the stack, and then determine the contents of the stack is digital, the digital outputCodePudding user response:
There will be a decimal point, specific what to do, is there any shoppingCodePudding user response:
regular match it
String STR="(permanent population urbanization rate (25) + permanent population quantity (0), the actual service population (0)) AVG";
String reg=\ \ "d + \ \.? \ \ d * ";
The Pattern the Pattern=Pattern.com running (reg);
Matcher matcher=pattern.matcher(str);
Double total=0;
While (the matcher. The find ()) {
Total +=Double. ParseDouble (matcher. Group (0));
}
System. The out. Println (total);
CodePudding user response:
For the first time to the calculation of transformation, but the second click function will not be able to calculate the conversion is not successful, that what should I do
CodePudding user response:
The first time can give you a zero for the second time the default when the "resident population... "Won't give you switch, you have a look at your form submission and the received data