java中做字符串非空判断,为什么要同时判断字符串不为null和不等于空串?

2021-03-02 09:22发布

例如:str != null && !.equals(str)

例如:str != null && !"".equals(str)