当前位置: 技术问答>java相关
如何在页面间传递接收整型参数?
来源: 互联网 发布时间:2015-09-09
本文导语: 我用 int column_number=request.getParameter("column_number"); 告诉我Can't convert java.lang.String to int | String cn =request.getParameter("column_number"); int column_number = Integer.parseInt(cn); | 传递的...
我用 int column_number=request.getParameter("column_number");
告诉我Can't convert java.lang.String to int
告诉我Can't convert java.lang.String to int
|
String cn =request.getParameter("column_number");
int column_number = Integer.parseInt(cn);
int column_number = Integer.parseInt(cn);
|
传递的是String类型,接受到后转化成int.
String str_column_number=request.getParameter("column_number");
int n_column_number = Integer.parseInt(str_column_number);
String str_column_number=request.getParameter("column_number");
int n_column_number = Integer.parseInt(str_column_number);