会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
zwh2020
博客园
首页
新随笔
联系
订阅
管理
2022年1月20日
代码优化:使用Objects.equals(Object a,Object b)来进行对象的比较
摘要: 一、建议 推荐使用JDK7中新引入的Objects工具类来进行对象的equals比较,直接a.equals(b),有空指针异常的风险 public final class Objects {/** * Returns {@code true} if the arguments are equal t
阅读全文
posted @ 2022-01-20 09:28 周文豪
阅读(769)
评论(1)
推荐(0)
编辑