NumberFormatException是什么东西啊?

asiaec 2003-03-28 01:28:45
帮我猜一下是什么问题吧!


java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:394)
at java.lang.Integer.parseInt(Integer.java:476)
at com.jetech.rpms.system.util.RightUtil.getUnit(RightUtil.java:169)
at com.jetech.rpms.system.util.RightUtil.searchRight(RightUtil.java:94)
at com.jetech.rpms.system.util.RightUtil.initRightInfo(RightUtil.java:46
)
...全文
353 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
skysaint 2003-03-28
  • 打赏
  • 举报
回复
用try和catch捕获,再处理异常
hanty 2003-03-28
  • 打赏
  • 举报
回复
先判断是否为空,再格式数字类型
tangqiuzheng 2003-03-28
  • 打赏
  • 举报
回复
我请问龙津啤酒,能不能告诉我怎么阅读那些异常信息:(即怎么根据那些异常代号查找原因呀?)
xgchar 2003-03-28
  • 打赏
  • 举报
回复
Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.


NumberFormatException
public NumberFormatException()



Constructs a NumberFormatException with no detail message.

NumberFormatException
public NumberFormatException(String s)

Constructs a NumberFormatException with the specified detail message.

Parameters:
s - the detail message.
comnetorgcn 2003-03-28
  • 打赏
  • 举报
回复
方法Integer.parseInt(String a),当a为空或者不含有数字时可能会报这样的错
asiaec 2003-03-28
  • 打赏
  • 举报
回复
request.setAttribute("pagectl",pageCtl);
request.setAttribute("personlist",col);
return mapping.findForward("success");

81,116

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧