jsp中经常用到的变量数据类型转换例子,jsp中经
分享于 点击 11039 次 点评:35
jsp中经常用到的变量数据类型转换例子,jsp中经
一从页面前台拿值
int id=Integer.parseInt(row.get("id").toString());
int houseId=Integer.parseInt(row.get("houseId").toString());
String houseType=row.get("houseType").toString();
int houseState=Integer.parseInt(row.get("houseState").toString());
二 从数据库中取出result 类型的值赋给每一个变量
Map[ ] rows=result.getRows()
for(Map row:rows)
{
String shopName=row.get("shopName").toString();
double price=Double.parseDouble(row.get("price").toString());
int quantity=Integer.parseInt(row.get("quantity").toString());
}
相关文章
- 暂无相关文章
用户点评