字符串 比较 避免 null pointer exception

来源:互联网 发布:容声和美菱哪个好 知乎 编辑:程序博客网 时间:2024/06/06 09:11

修改前

if (bookType.equals("CANCELLED")) {

修改后

if("CANCELLED".equals(bookType)
0 0
原创粉丝点击