0

java 怎样判断null和空

natividad created at6 years ago view count: 2440

服务端提供的接口经常有null的情况, 怎样判断防止崩溃?

report
回复
0
if(str != null && !str.trim().isEmpty())
6 years ago 回复
0

服务端应该去掉下null, 返回数据的地方统一循环处理下。

6 years ago 回复

Recent search keywords