摘要:
1 isNotEmpty(str) 等价于 str != null && str.length > 0 2 isNotBlank(str) 等价于 str != null && str.length > 0 && str.trim().length > 0 3 同理 : 4 isEmpty 等价于 str == null || str.length == 0 5 isBlank ... 阅读全文
posted @ 2018-11-15 18:08
请叫我老焦
阅读(412)
评论(0)
推荐(0)
摘要:
以上会报空指针异常;而下面这样就可以打印 null。 这种方式能正常运行,原因如下:debug 代码会发现,两种方式执行了不同的重载方法,第一种执行了以下方法 第二种执行了以下方法, 如果对重载不熟悉,很难解释其中原因;当然null是另一个让人头疼的问题, 重载 Java 的重载解析过程是以两阶段运 阅读全文
posted @ 2018-11-15 18:01
请叫我老焦
阅读(4908)
评论(0)
推荐(1)

浙公网安备 33010602011771号