当前位置:网站首页>string null转空字符串(空字符串是什么意思)
string null转空字符串(空字符串是什么意思)
2022-07-26 10:17:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
今天在自己之前做的项目中,犯了一个错误,是自己考虑不周。在项目中自己需要,从后台数据库中获取数据,然后将数据转成Int类型。但是自己忽略了数据为空的情况。例如:
在这里,String字符串为空,用Integer.parseInt()方法进行转换报错。修改之后如下
今天自己的错误,导致现场人员在给客户展示系统的时候,出现问题,以后从数据库中获取数据,一定要注意注意再注意!
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/128018.html原文链接:https://javaforall.cn
边栏推荐
- Strange Towers of Hanoi|汉诺塔4柱问题
- Learning about opencv (1)
- Sublime install plug-ins
- Formwork (III)
- Mysql5.7.25 master-slave replication (one-way)
- 数通基础-二层交换原理
- In Net 6.0
- What will the new Fuzhou Xiamen railway bring to Fujian coastal areas?
- 【socket】三次握手是在listen中完成,accept只从完成连接的队列中拿出一个连接
- [award-winning question] ask Judea pearl, the Turing prize winner and the father of Bayesian networks
猜你喜欢
随机推荐
Jpg to EPS
【Halcon视觉】图像灰度变化
Force deduction DFS
MySQL function
【Halcon视觉】阈值分割
El table implements adding / deleting rows, and a parameter changes accordingly
PMM (percona monitoring and management) installation record
数通基础-二层交换原理
About automatic operation on Web pages
INSTALL_FAILED_SHARED_USER_INCOMPATIBLE错误解决方式
Getting started with SQL - combined tables
How to use Gmail to pick up / send mail on Foxmail
In Net 6.0
Study notes of the fifth week of sophomore year
【Halcon视觉】仿射变换
时间序列异常检测
利用原生js实现自定义滚动条(可点击到达,拖动到达)
AirTest
面试突击68:为什么 TCP 需要 3 次握手?
C language course design Tetris (Part 1)