欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > > 文章正文

jsp中经常用到的变量数据类型转换例子,jsp中经

来源: javaer 分享于  点击 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());

  }

相关文章

    暂无相关文章

用户点评