【发布时间】:2011-11-05 14:30:57
【问题描述】:
在 Java 代码的 if 语句中,我经常读到类似 if(string != null && string.isEmpty() == false) 的内容。我习惯写if(string != null && !string.isEmpty())
使用!string.isEmpty()有什么缺点吗?
【问题讨论】:
标签: java string coding-style if-statement