在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!
谢谢!
谢谢!
int不是Object
是的,可是要怎样做才能转换成int呢?谢谢!
Integer nRos=new Integer(request.getAttribute("row"););
int nRow = ((Integer)request.getAttribute("row")).intValue();
int nRow = 0;
Integer oInt = new Integer(request.getAttribute("row"));
还是不行,报错:
"123.jsp": cannot find symbol; symbol : constructor Integer(java.lang.Object), location: class java.lang.Integer
"123.jsp": internal error; cannot instantiate java.lang.Integer.<init> at java.lang.Integer to ()
int nRow = ((Integer)request.getAttribute("row")).intValue();可以呢!谢谢大家!