Exception in thread "main" java.lang.Error: Unresolved compilation problem:

来源:百度知道 编辑:UC知道 时间:2024/06/08 13:48:05
The method load(Class, Serializable) in the type Session is not applicable for the arguments (Class, int)

at com.cstp.bussiness.UserTest.updateusers(UserTest.java:46)
at com.cstp.bussiness.UserTest.main(UserTest.java:57)
换成Integer 还是不行呀

Serializable 是对Object而言的,把参数类型int 换成Integer类型试试。

还是不行会报什么错?空指针?检查下Integer的值是否已经传递过来,如果已经传递过来还报空指针异常,换成Session的get方法试试。