session中存入double值的取法

session中存入double值的取法
Double price  =   0.0 ;
for ( int  i = 1 ;i <= 5 ;i ++ ){
    price
+= i;
}
double  yy  =  Double.parseDouble(price.toString());


session.setAttribute(
" price " ,price);

double  y  =  Double.parseDouble(session.getAttribute( " price " ).toString);

你可能感兴趣的:(session中存入double值的取法)