把String装换为int及double型
1.
String money = (double)ruquest.getParameter("money");
String info = (int)ruquest.getParameter("kindinfo");
double d = 0;
int i = 0;
try
{
d = Double.parseDouble(money);
i = Integer.parseInt(info);
}
catch(Exception e)
{
}
2.
String转换成int
1). int i = Integer.parseInt([String]); 或
i = Integer.parseInt([String],[int radix]);
2). int i = Integer.valueOf(my_str).intValue();
String转换成Double
1). double i = Double.parseDouble([String]); 或
i = Double.parseInt([String],[double radix]);
2). double i = Double.valueOf(my_str).intDouble();